Adaptive method and apparatus for forecasting and controlling neurological disturbances under a multi-level control

ABSTRACT

A method and apparatus for forecasting and controlling neurological abnormalities in humans such as seizures or other brain disturbances. The system is based on a multi-level control strategy. Using as inputs one or more types of physiological measures such as brain electrical, chemical or magnetic activity, heart rate, pupil dilation, eye movement, temperature, chemical concentration of certain substances, a feature set is selected off-line from a pre-programmed feature library contained in a high level controller within a supervisory control architecture. This high level controller stores the feature library within a notebook or external PC. The supervisory control also contains a knowledge base that is continuously updated at discrete steps with the feedback information coming from an implantable device where the selected feature set (feature vector) is implemented. This high level controller also establishes the initial system settings (off-line) and subsequent settings (on-line) or tunings through an outer control loop by an intelligent procedure that incorporates knowledge as it arises. The subsequent adaptive settings for the system are determined in conjunction with a low-level controller that resides within the implantable device. The device has the capabilities of forecasting brain disturbances, controlling the disturbances, or both. Forecasting is achieved by indicating the probability of an oncoming seizure within one or more time frames, which is accomplished through an inner-loop control law and a feedback necessary to prevent or control the neurological event by either electrical, chemical, cognitive, sensory, and/or magnetic stimulation.

This application is related to co-pending patent application “UnifiedProbabilistic Framework For Predicting and Detecting Seizure Onsets InThe Brain and Multitherapeutic Device”, Ser. No. 09/693423, filed Oct.20, 2000. The present application is also related to internationalapplication WO 00/10455, published under the Patent Cooperation Treaty(PCT) on Mar. 2, 2000. The related patent applications are herebyincorporated by reference into this description as fully as if hererepresented in full.

BACKGROUND OF THE INVENTION

The present invention is in the field of prediction and control ofneurological disturbances, particularly in the area of electrographicand clinical seizure onset prediction based on implantable devices withthe major goal of alerting and/or avoiding seizures.

Approximately 1% of the world's population has epilepsy, one third ofwhom have seizures not controlled by medications. Some patients, whoseseizures reliably begin in one discrete region, usually in the mesial(middle) temporal lobe, may be cured by epilepsy surgery. This requiresremoving large volumes of brain tissue, because of the lack of areliable method to pinpoint the location of seizure onset and thepathways through which seizures spread. The 25% of refractory patientsin whom surgery is not an option must resort to inadequate treatmentwith high doses of intoxicating medications and experimental therapies,because of poorly localized seizure onsets, multiple brain regionsindependently giving rise to seizures, or because their seizuresoriginate from vital areas of the brain that cannot be removed. Forthese and all other epileptic patients, the utilization of a predictingdevice would be of invaluable help. It could prevent accidents and allowthese patients to do some activities that otherwise would be risky.

Individuals with epilepsy suffer considerable disability from seizuresand resulting injuries, impairment of productivity, job loss, socialisolation associated with having seizures, disabling side effects frommedications and other therapies. One of the most disabling aspects ofepilepsy is that seizures appear to be unpredictable. However, in thisinvention a seizure prediction system is disclosed. Seizure predictionis a highly complex problem that involves detecting invisible andunknown patterns, as opposed to detecting visible and known patternsinvolved in seizure detection. To tackle such an ambitious goal, someresearch groups have begun developing advanced signal processing andartificial intelligence techniques. The first natural question to ask isin what ways the preictal (i.e., the period preceding the time that aseizure takes place) intracranial EEGs (IEEGs) are different from allother IEEGs segments not immediately leading to seizures. When visualpattern recognition is insufficient, quantitative EEG analysis may helpextract relevant characteristic measures called features, which can thenbe used to make statistical inferences or to serve as inputs inautomated pattern recognition systems.

Typically, the study of an event involves the goals of diagnosing(detecting) or prognosticating (predicting) such event for corrective orpreventive purposes, respectively. Particularly, in the case of braindisturbances such as epileptic seizures, these two major goals havedriven the efforts in the field. On one hand, there are several groupsdeveloping seizure detection methods to implement corrective techniquesto stop seizures, and on the other, there are some groups investigatingseizure prediction methods to provide preventive ways to avoid seizures.Among the groups claiming seizure prediction, three categories ofprediction can be distinguished, clinical onset (CO) prediction,electrographic onset (EO) prediction studies, and EO prediction systems.All these categories in conjunction with seizure detection compose mostof the active research in this field.

Related art approaches have focused on nonlinear methods such asstudying the behavior of the principal Lyapunov exponent (PLE) inseizure EEGs, computing a correlation dimension or nonlinear chaoticanalysis or determining one major feature extracted from the ictalcharacteristics of an electroencephalogram (EEG) or electrocorticogram(ECoG).

IMPORTANT TERMINOLOGY DEFINITIONS

Ictal period: time when the seizure takes place and develops.

Preictal period: time preceding the ictal period.

Interictal period or baseline: period at least 1 hour away from aseizure. Note that the term baseline is generally used to denote“normal” periods of EEG activity, however, in this invention it is usedinterchangeably with interictal period.

Clinical onset (CO): the time when a clinical seizure is firstnoticeable to an observer who is watching the patient.

Unequivocal Clinical onset (UCO): the time when a clinical seizure isunequivocally noticeable to an observer who is watching the patient.

Unequivocal Electrographic Onset (UEO): also called in this workelectrographic onset (EO), indicates the unequivocal beginning of aseizure as marked by the current “gold standard” of expert visualanalysis of the IEEG.

Earliest Electrographic Change (EEC): the earliest change in theintracranial EEG (IEEG) preceding the UEO and possibly related to theseizure initiation mechanisms.

Focus Channel: the intracranial EEG channel where the UEO is firstobserved electrographically.

Focal Adjacent Channel: the intracranial EEG channels adjacent to thefocus channel.

Focus Region: area of the brain from which the seizures first originate.

Feature: qualitative or quantitative measure that distills preprocesseddata into relevant information for tasks such as prediction anddetection.

Feature library: collection of algorithms used to determine thefeatures.

Feature vector: set of selected features used for prediction ordetection that forms the feature vector.

Aura: symptom of a brain disturbance usually preceding the seizure onsetthat may consist of hallucinations, visual illusions, distortedunderstanding, and sudden, intense emotion, such as anxiety or fear.

FIGS. 11A-11B illustrate some of the defined terms on segments of a rawIEEG signal. Comparison between the preictal segment indicated on FIG.11A (between the EEC and the UEO times) and the interictal period inFIG. 11B demonstrates the difficulty of discerning between them. Thevertical scale in both figures is in microvolts (μV).

SUMMARY OF THE INVENTION

This invention is an automatic system that predicts or provides earlydetection of seizure onsets or other neurological events or disturbanceswith the objective of alerting, aborting or preventing seizures or otherneurological ailments by appropriate feedback control loops withinmultiple layers. One of the main differences from other inventions isthat the major functions of the brain implantable device is forecastingand preventing seizures or other brain disturbances rather than onlydetecting them. Unlike other inventions, the goal is to predict theelectrographic onset of the disturbance or seizure rather than theclinical onset. Seizure UEO detection is also accomplished as a directconsequence of the prediction and as a means to assess deviceperformance. Furthermore, the innovative presence of a supervisorycontrol provides the apparatus with a knowledge updating capabilitysupported by the external PC or notebook, and a self-evaluationproficiency used as part of the feedback control to tune the deviceparameters at all stages, also not present in the other art.

The approach disclosed in the present invention, instead of focusing onnonlinear methods, or on one particular feature, targets multiplefeatures from different domains and combines them through intelligenttools such as neural networks and fuzzy logic. Multiple and synergisticfeatures are selected to exploit their complementarity. Furthermore,rather than using a unique crisp output that considers one particulartime frame, as the previous methods introduced, the system provides oneor more probabilistic outputs of the likelihood of having a seizurewithin one or more time frames. Based on this, when a thresholdprobability is reached, an approaching seizure can be declared. The useof these multiple time frames and probabilistic outputs are otherdistinct aspects from previous research in the field.

The system possesses multiple levels of closed-loop control. Low-levelcontrols are built up within the implantable device, and consist ofbrain stimulation actuators with their respective feedback laws. Thelow-level control operates in a continuous fashion as opposed toprevious techniques that provide only one closed-loop control that runsonly during short times when the seizure onset is detected. Thehigh-level control is performed by a supervisory controller which isachieved through an external PC or notebook. By using sophisticatedtechniques, the prediction system envisioned allows the patients orobservers to take appropriate precautions before the seizure onset toavoid injuries. Furthermore, the special design of the apparatusfurnishes powerful techniques to prevent or avoid seizures and to obtainmore insight into these phenomena, thereby revealing important clinicalinformation. The innovative use of a supervisory control is the optionthat confers the apparatus its unique perspective as awarning/control/adaptive long-term device. The warning is achieved byforecasting the disturbance; the control is accomplished by anappropriate feedback law and a knowledge base update law; and theadaptive capability of the device is attained also by the knowledge baseupdate law driven by the supervisory control. This knowledge baseresides in an external personal computer (PC) or notebook that is theheart of the supervisory control, where the apparatus computesoptimization routines, and self-evaluation metrics to establish itsperformance over time, to determine required adjustments in the systemset points and produce an updating law that is fed back into the systemfrom this higher level of control.

The control law provided in the device allows a feedback mechanism to beimplemented based on electrical, chemical, cognitive, intellectual,sensory and/or magnetic brain stimulation. The main input signal to thefeedback controller is the probability of having a seizure for one ormore time frames. The supervisory control is based on an externalcontrol loop, operating at a higher control level, that compiles newinformation generated at the implantable device into the knowledge baseat discrete steps and provides set point calculations based onoptimizations performed either automatically, or semi-automatically bythe doctor or authorized individual.

The above and other novel features, objects, and advantages of theinvention will be understood by any person skilled in the art whenreference is made to the following description of the preferredembodiments, taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an overview of the overall system architecture of thepresent invention.

FIG. 2 illustrates an exemplary scheme of the multi-level supervisorycontrol of the present invention.

FIG. 3 illustrates the main stages and components of this invention inorder to achieve the approach presented for an on-line implementation.

FIG. 4 illustrates an exemplary block diagram of the intelligent dataprocessing unit that is the core section of the system and is mainlyrelated to forecasting seizure or brain disturbances.

FIG. 5 illustrates the processing logic for the selection of an optimalfeature vector.

FIG. 6A illustrates the effect of subtracting the focus channel recordedwith the intracranial EEG from its adjacent intracranial EEG channel fora 4-minute segment.

FIG. 6B illustrates the same 4-minute of IEEG depicted in FIG. 6A butwithout channel subtraction.

FIG. 7 illustrates the sliding observation window (gray area) that caninclude one or more brain signal (IEEG) channels as it is approaching anepileptic seizure.

FIG. 8 illustrates an exemplary scheme followed by the low-levelfeedback control.

FIG. 9 illustrates a block diagram demarking the blocks within theimplantable device and each of the processing or control blocks and thesystem, which in this case is the brain or the human body.

FIG. 10 illustrates a block diagram of the control mechanisms of thepresent invention.

FIG. 11 illustrates segments of intracranial EEG that are useful toexplain some terminology used throughout this description.

FIG. 12 illustrates the classification of the features into two types:instantaneous and historical features.

FIG. 13 illustrates the average power for both a preictal and aninterictal segment in two one-hour records of an IEEG segment.

FIG. 14 illustrates the accumulated energy for the awake record of apatient. Note that preictal (continuous lines) as well as baselinerecords (dotted lines) are included in the plots to emphasize thedistinguishability and prediction potential of this feature.

FIG. 15 illustrates the accumulated energy for the asleep record of apatient.

FIG. 16 illustrates the accumulated energy trajectories of 80 one-hourrecords including 50 baselines and 30 preictal segments.

FIG. 17 illustrates the fourth power indicator (FPI) over time.

FIG. 18 illustrates the processing logic for the selection of thesliding observation window size for maximum distinguishability betweenclasses.

FIG. 19 illustrates the k-factor as a function of the window length forthe weighted fractal dimension in four different records.

FIG. 20 illustrates a nonlinear energy derived feature for a preictaland a baseline record from another patient studied.

FIG. 21 illustrates the thresholded nonlinear energy in fivepreictal/ictal one-hour segments and six one-hour baseline segments.

FIG. 22 illustrates the location and magnitude of the short term energyof the wavelet coefficient above the long term energy adaptivethreshold.

FIG. 23 illustrates the power in alpha band for preictal and baselinerecords.

FIG. 24 illustrates an IEEG segment (top) and the spike detector output(bottom).

FIG. 25 illustrates the excess of the spike detector output over apre-established threshold over time in four preictal/ictal and fourbaseline records.

FIG. 26 illustrates the absolute value of the 4^(th) scale waveletcoefficients average, for five seizure records from the same patient.

FIG. 27 illustrates graphs of the mean frequency of a seizure (top) anda baseline (bottom).

FIG. 28 illustrates how features are aligned to conform the featurevector and how the span used is the same for features generated withdifferent window lengths.

FIGS. 29A-29B illustrate graphs that are proportional to the probabilitydensity functions (pdfs) of the feature fractal dimension for each ofthe classes defined in two different patients. Note the overlap regionbetween the classes is marked with the cross-hatched lines.

FIGS. 30 and 31 illustrate scatter plots demonstrating thecomplementarity of features for two different patients in 1-dimensionaland 2-dimensional plots.

FIG. 32 illustrates an exemplary probabilistic neural network (PNN)architecture.

DETAILED DESCRIPTION OF THE INVENTION

The preferred embodiment of the invention uses brain electrical signalsor other input signals and an implanted processor to predict and provideearly detection of the electrographic onsets of brain events such asseizures in an on-line intelligent arrangement that facilitates a widevariety of options. FIG. 1 is an overview of the overall systemarchitecture from the data input to the output signal indicating theprobability of having a brain disturbance or seizure, and to theclosed-loop controls included in the system. The data is sketched asbrain electrical activity, but it is not restricted to this type ofactivity; it can also include chemical, magnetic, temperature, bloodpressure, and/or any other physiological variable that can containrelevant information for prediction and early detection of the seizureonset. In FIG. 1, the main system blocks can be visualized starting atthe data generation block 100, then the intelligent data processing unit200 which is a key part of the system responsible for forecasting, andthe low level and high level closed-loop controls 300 and 400,respectively that tie into a supervisory control approach. In thisfigure, the data generation block 100 does not include the brain, whichis the plant in this case; rather it only includes the electrodes,cables, and any sensor used to capture physiological variables that gointo the forecasting section or intelligent data processing unit 200.The system is implemented with both an off-line and on-line methodology.The off-line part of the method plays a role at the initializationstage, and after that, at subsequent adaptive parameter re-tunings,setpoint readjustments, and at a higher layer of hierarchy as a researchtool seeking for an understanding of the mechanisms that operate duringepileptic seizures or brain disturbances, and investigating newalgorithms or features for prediction and early detection of the UEO ofseizures.

FIG. 2 illustrates the scheme of the multi-level control, where thethree layers of this control scheme are depicted. The control actionsare performed through these layers organized in a hierarchical manner.The main goal of the multi-level control is to keep the patient fromhaving seizures despite environmental and physiological loaddisturbances. To achieve this objective, a supervisory control isimplemented providing (a) continuous regulation of the controlledvariables, (b) adaptation to external or internal changes over time, and(c) a knowledge base used to accomplish the regulation and adaptation byincorporating information as it arises, and updating the system settingsand parameters appropriately. At the regulatory layer, a low levelsupervisory control 300 takes care of the actuators (stimulation units)and determines and adjusts their settings in a continuous fashion. Thecontrol in this layer is based on the implanted processor. At thecoordination layer, the high level of supervisory control 400 isachieved, based on an external computer where the knowledge baseresides. This layer is responsible for re-tuning system parameters suchas those related to fusion of sensory data, feature extraction, featurenormalization, neural network retraining, fuzzy logic adjustments, faultdiagnosis of actuators, sensors, implantable device, etc. This layer canoperate in an automatic mode where a master program monitors thecontrolled variables and updates the control law accordingly; or in asemi-automatic mode where the doctor or specialist can input parametersdirectly into the system via the master program user interface. At thehighest level is the research layer based on another external computer600 whose major function is to serve as a research tool to investigatenew more powerful algorithms for seizure or brain disturbances, UEOprediction and detection, new control strategies, other types ofparameter adjustment, and also to analyze physiological mechanisms thatcan explain seizures and other brain disturbances. This layer gathersinformation coming from different patients forming a database forresearch and development.

At the initialization stage, during the off-line part of the method, thesystem is installed and the initial settings are determined for all theblocks indicated in FIG. 1. The on-line operation follows after allsettings are adjusted according to the patient. Future generations ofthis invention might automate the off-line procedure, turning theapparatus into an almost completely on-line system with the exception ofthe electrodes positioning, the implantable device installation, andtransference to the implantable device of newly developed and releasedalgorithms (i.e., new features).

The initialization and operation of this apparatus is divided into threestages: pre-implantation and initialization, forecasting, andcontrolling. FIG. 3 provides an exemplary diagram illustrating thefundamental blocks that manage these stages. The stages are initiatedconsecutively and under different procedures. The first stage includesthe installation and manual or automatic off-line tuning of the system.It has optional steps depending on the particular patient requirements,on the seizure complexity, and on whether the system isfeature/parameter-tuned or only parameter-tuned. A feature/parametertuned device refers to a system where the features are selected for eachpatient, depending on which features can capture the seizure UEO inadvance. Therefore, different patients have different features withinthe feature vector, and once these features are selected theirparameters are tuned. A parameter-tuned system uses the same featuresfor all patients, and tunes the parameters of each feature on a patientbasis. One common parameter that can be adjusted for all the features isthe running window length used in the feature extraction.

Summarizing this idea, the embodiment of this invention ispatient-tuned, with two possible alternatives. Either the same featuresare used for all patients and their parameters are tuned according toeach patient, or the features are selected according to the patient andtheir parameters adjusted on a patient basis as well. The secondapproach is the more robust and is the system default.

An overview of the steps that comprise the initialization and operationof this apparatus is presented next. An exemplary general diagram of thestages and blocks involved in each stage is illustrated in FIG. 3.

1. First Stage: Implantation and Initialization

The patient undergoes a surgical procedure in order to accomplish theimplantation and initialization stage. The following steps are used aspart of the implantation procedure.

Step 1: Determination of focus region for correct installation of theimplanted brain electrodes.

Step 2: Appropriate installation of the electrodes and other sensors.The sensors can be selected from the group of (a) intracranialelectrodes; (b) epidural electrodes, such as bone screw electrodes; (c)scalp electrodes; (d) sphenoidal electrodes; (e) foramen ovaleelectrodes; (f) intravascular electrodes; (g) chemical sensors; (h)pupil dilation sensing systems; (i) eye movement sensors; (j) heart ratesensors; and (k) body temperature sensors.

Step 3: Implantation of the electronic device into the brain. Once theimplantation is completed, the initialization of the system is the nextpart of the implantation and initialization stage. In one embodiment ofthe invention, the initialization is performed by the implantable devicein combination with an external PC or notebook or equivalently by theregulatory and the coordination layers, respectively. This is possiblebecause the system has an optional external portable module 500 thatcontains an external communication unit 510, a settings adjustment unitwith display and keypad 570, an intermediate storage device 560, abattery recharger 550, patient input channels 540, and data outputchannel 540 as shown in FIG. 4. The external communication unit 510creates a data flow path from the internal communication unit 280 suchthat the data acquired by the implantable device, blocks 100, 200, and300, is transferred to the intermediate storage device 560 within theexternal portable module 500. In this embodiment, at the initializationstage data must be collected to select and tune the featuresappropriately according to the patient. This implies that one or morebrain disturbances or seizures must have been recorded to carry out theparameter tuning and/or feature selection. Therefore, the patient maywalk out of the hospital with the external portable module 500activated, while the system is still in the initialization stage and theforecasting has not started, and then return later for parameter tuningand/or feature selection. The recording time autonomy of the systemdepends on the final memory capacity achieved in the intermediatestorage device, which can be based on a flash memory card that can store160 Mbytes or more, or on any other type of memory device suitable forthis portable module. Using a sampling rate of 200 Hz in the A/Dconverters and assuming an intermediate storage device of 140 Mbyteswhich may evolve into a higher capacity device as the technologyadvances, the portable module confers the equipment with a two-dayrecording time autonomy for two channels or more as new higher memorydevices become available. This means the patient either has to be backin the hospital or have the system connected to an external PC at homeevery two days for data downloading from the intermediate storage deviceinto that external PC, or into a remote PC that can be located at thedoctor's office and where the information can be loaded via theInternet. In either case, the information is transferred onto thedesignated hard disk. An output signal is triggered by the externalportable module before the intermediate storage device is full,reminding the patient that it is time for data downloading. If thepatient does not download the data stored, then the intermediate storagedevice starts operating in a first in first out (FIFO) mode, such thatonce the download is accomplished only the last two days of data areavailable. With the continuous improvements in technology, the timebetween data downloadings can become longer as higher memory capacitydevices are developed. When four or five brain episodes are recorded anddownloaded into the high level controller, a feature selection processcan then take place in the external PC or notebook if thefeature/parameter approach is used, otherwise this step is skipped. Theimplantable device is based on a microprocessor, a digital signalprocessor (DSP), a field programmable gate array (FPGA), or anapplication specific integrated circuit (ASIC) processor 290, and thespecific block of the implantable device that operates during theinitialization is the intelligent data processing unit 200 whose majorfunction is forecasting the brain event or seizure once the featurevector is established. FIG. 4 illustrates a diagram of the intelligentdata processing unit 200. The initialization part can be split out inthe following steps.

Step 4: Installation of the external portable module 500.

Step 5: Continuous data recording into the intermediate storage device560 and downloading into the external PC or notebook 400 until aroundfive or more brain disturbances or seizures are recorded. Ideally atleast five brain disturbances should be recorded, however depending onthe specific case, fewer or more brain disturbances may be requiredbefore proceeding with the next step.

Step 6: Sensor data preprocessing and fusion followed by featureextraction and selection at the high supervisory level in the externalPC 400 where the data has been stored after downloading.

Step 7: Selection of the best feature set according to the proceduresketched in FIG. 5 by the coordination layer 400. The final product ofthis step is the establishment of the feature vector. This step can beskipped when the parameter-tuning approach is used.

Step 8: Transference and setting of the selected feature programs intothe implantable device.

In this embodiment of the invention the feature/parameter approach isused, and therefore, the initial parameter tuning for each of thefeatures selected and for the other system blocks is completed in theexternal PC or notebook 400. However, if the parameter-tuning approachis used in combination with the external portable module 500 for datarecording, then either the external PC or notebook 400 or theimplantable device processor performs the initial parameter tuning.

In another embodiment of the invention, a manual parameter tuning isaccomplished by the doctor or authorized individual through the externalportable module 500 via the settings adjustment unit 570, based onprevious knowledge information of the patient, on historical informationavailable from other patients, and on the specialist experience. Inother embodiments of the invention, the initial parameter tuning isperformed automatically by new generations of the implantable devicebased on the development of new devices and technology advancements.

To summarize, in the default embodiment of the invention, theinitialization part of this stage is performed by the implantable device200, 300 and by the external computer 400. The core of the supervisorycontrol that resides in the external computer 400 located within thecoordination layer can be assisted by a doctor or specialist toestablish desired setpoints, so that the system parameters can be tunedproperly for the patient.

2. Second Stage: Forecasting

The second stage is the system core, in which the forecasting takesplace. FIG. 4 shows a block diagram of this stage. It encompasses theon-line implementation of the forecasting system 200, which includescomponents for pre-processing 210, analog to digital conversion 225,235, real time analog and/or digital feature extraction or processing245, 220, respectively, the feature vector generator 250, theintelligent prediction analysis/classification 260 for estimation of theprobability of having a seizure within certain time frames and alertingwhen a seizure is approaching, the internal communication unit 280 andthe external portable module 500. The closed-loop feedback control thatresides in the implantable device is not activated at this point. Adescription of the sequential tasks performed in this stage follows.

Step 1: Real time pre-processing of the input signals from differentsensors. In the case of sensors capturing the brain electrical activity,typical preprocessing includes subtracting the focus channel signal fromthe adjacent channel and filtering when necessary (FIG. 1, block 200;FIG. 4, blocks 211, 213). FIGS. 6A-6B present the effects of adjacentchannel subtraction on the IEEG signal. FIG. 6A presents a higherquality signal since a lot of artifacts present in FIG. 6B were abatedby the subtraction. This is done to remove any noise common to bothchannels. As a result, any common mode cortically generated signals arealso eliminated. However, this is not felt to affect adversely theseizure onset forecasting, since the seizure onset patterns are highlylocalized to the focus channel. IEEG data have been processed both withand without channel subtraction. Results by Esteller et al. (“Fractaldimension characterizes seizure onset in epileptic patients”, ICASSP1999) have demonstrated better detection and forecasting with channelsubtraction for specific features. This shows that for those particularfeatures the spatial separation between the electrodes inside the brainis short enough to cancel the common noise in that region, and longenough to capture a voltage difference between the focus and itsadjacent electrode. Of note, each of these electrodes records the globalactivity of many thousands of neurons.

Step 2: Depending on the type of processing required by each particularfeature, they are extracted either at an analog level (level I or 220)or at a digital level (level II or 245), whichever is more suitable forthe specific feature considering computational requirements, hardwarecapacity, and time constraints. The analog level of feature extractionis indicated in block 220 of FIG. 4.

Step 3: Digitizing 225, 235 and recording 230, 240, 270 the preprocessedand processed sensor signals with optional downloading of the recordeddata into the computer 400 or into the intermediate storage device 560.

Step 4: Extraction of the features at the digital level as indicated inblock 245 of FIG. 4.

Step 5: Generation of the feature vector or feature vectors 250 if morethan one time frame is used. Features extracted at levels I and II arecombined following a running-window methodology. This methodology isutilized for the generation of the feature vector(s) as sketched in FIG.7. For a pre-established window length, the features within the featurevector are computed. Subsequently, the window is shifted over the inputsignal or signals allowing some overlap and the feature is computedagain. The feature sampling period is given by the shifting for whichreasonable values are around half a second.

Step 6: The intelligent prediction analysis/classification can have anadditional processor if the need arises and the processing time of thecentral processor 310 is not sufficient for the computations required bythe implantable device. Before describing the intelligent predictionanalysis/classification step 260, a feature normalization step isnecessary. Typically the normalization involves subtracting the mean anddividing by the standard deviation. This is performed directly by thefeature vector generator 250. Logically, the feature mean and standarddeviation have to be estimated. The estimation of these parameters isconducted through a longer time window, which implies that a successionof feature vectors has to be generated and stored to estimate the valuesfor these parameters. This procedure is performed by the implantabledevice, and more specifically by the central processor 310 or theadditional processor if this is available. Once the parameters have beendetermined, the features are normalized appropriately. The parametersare updated as new feature values are computed in an on-line mode ofoperation, providing adaptability at this inner layer of the system.These parameters are also estimated by the high level supervisorycontrol 400.

Step 7: Intelligent analysis of the feature vector, for each time frameconsidered, is performed through a fuzzy system or a neural network (NN)such as the probabilistic NN, the k-nearest neighbor, the wavelet NN orany combination of these, to provide an estimation of the probability ofhaving a seizure for one or more time frames. This analysis is performedby the block denoted as intelligent prediction analysis/classification260 illustrated in FIGS. 1, 4 and 8. The implanted processor 310 guidesthis analysis, however if an additional processor is used, this willtake the leadership for this block. An in-depth presentation on how theprobability of having a seizure is estimated can be found in theco-pending patent application Ser. No. 09/693423. The coordination layerof the supervisory control 400 must be connected periodically or asrequired or indicated by the doctor through the external portable module500 with the goal of re-tuning the system parameters or adjusting theset points according to physiological and environmental changes. It isexpected that as time progresses the actions required from thesupervisory control will lessen, and therefore, the external connectionto a PC, for further analysis and inspection of the system or for datarecording may be needed rarely or occasionally. The ideal scenario isthat the system reaches a steady-state equilibrium where brain episodesare prevented by the brain stimulations such that they do not occur atall, and a clear measure of this is given by the seizure frequency ofthe patient. Thus, a combination of this adaptive implantable devicewith a complex system like the brain should exhibit zero or very nearzero seizure frequency to consider that it has reached the idealequilibrium.

Step 8: The probability output of having a seizure for one or more timeframes is shown on a portable display 520 contained within the externalportable module 500. When this probability is higher than an adaptivethreshold, a sound, visual, and/or tactile alarm(s) is(are) activated toalert the patient of the oncoming seizure. A more detailed descriptionof this probability output and its operation is presented in theco-pending patent application Ser. No. 09/693423.

Step 9: This step utilizes the external portable module 500 and theinternal and external communication units 280, 510, respectively). Theexternal portable module 500 has its own preprogrammed processor withspecific tasks that include scheduling and control of data downloadinginto the intermediate storage device, data transference from theintermediate storage device to an external PC with the option oftransference through the Internet, battery recharger, display andkeypad, patient input channels, output channel with the alarm(s) thatindicate the probability of having a seizure, external programmingcontrol or settings adjustment unit 570 whose function is theprogramming of the different options that the apparatus offers via thekeypad, and data transference from the external PC to the externalportable module to establish the supervisory control actions andcommunicate them to the implantable device. The settings adjustment unit570 is password-activated such that it is protected and only authorizedpersonnel can access it.

Step 10: The communication link is accomplished by a direct electricalconnection, by telemetry, by magnetic induction, by optical orultrasound connection as indicated in FIG. 4. In either case, internaland external bi-directional communication units 280, 510, respectivelyare used to manage the information transference between the centralprocessor 310 within the implantable device and the external portablemodule 500. The implantable device and the external portable moduleprocessors can write or read the internal and external communicationunits 280, 510, respectively, any time that it is necessary. Every timethe internal 280 or the external communication unit 510 receivesinformation from the other end, it sends an interrupt to the processorwithin the implantable device or within the external portable module,respectively. Interrupt priorities are assigned according to theimportance of the information transmitted.

Step 11: The system records input signals in several possiblemodalities. One modality records the physiological input signals duringapproximately one hour or more depending on the on-board memorycapability 270 finally achieved in the implantable device. In thismodality the recording starts some time before the probability thresholdfor approaching seizures is reached, by utilizing a set of buffersavailable for the task of temporarily storing the data. This modality ispermanently activated and provides information to the internaladaptation loop of the low level controller when it is activated. Asecond modality utilizes the external portable module 500 and isactivated upon connection of the module to the system. It has the optionof recording continuously the input signals, the feature vector, and/orthe controlled variables into the intermediate storage device 560 viathe communication link. Depending on the data option selected, therecording time autonomy will change. It will be the longest when onlythe controlled variables are recorded, and the shortest when the inputsignals, the features, and the controlled variables are selected forrecording. The external portable module 500 indicates when theintermediate storage device requires downloading of its stored data intoan external PC representing the third storage modality. Thesedownloading times are required to keep memory available in theintermediate storage device for incoming data. Three levels of datadownloading are possible, one from the implantable device 200, 300 tothe external portable device 500, and the others from the externalportable device 500 to the external PC 400. The communication link forthe first level of data downloading from the implantable device into theintermediate storage device is established by either a telemetry unit, aspecial hook up, magnetic induction, ultrasound or optical connection.The third storage modality has two options or levels of datadownloading. One level of data downloading from the intermediate storagedevice to the external PC is established by a direct electricalconnection in the form of a USB port, a serial port, or a parallel port.The information downloaded into the external PC is stored on a hard diskspecific for this purpose. The second level of data downloading from theintermediate storage device to the external PC is accomplished throughthe Internet. In this form the information can be downloaded into acomputer that can be at a different physical location, either at thedoctor's office, laboratory, etc. The information recorded on that diskcan be retrieved by the supervisory control at the coordination layer.At the automatic level of operation of the supervisory control, theinformation is retrieved by an intelligent master program that isrunning in the background; and at the semiautomatic level of operation,the information is retrieved by the doctor, the patient, or anauthorized individual, via the software user interface that allows theinteraction with the master program. Any of these recording modalitiescan be manually deactivated by the doctor or an authorized individual.

Step 12: Before proceeding with the activation of the implantedclose-loop control (i.e., the starting step of the next stage), anadaptation time must be allowed for the forecasting block to reach afiner tuning. The time required for this initial adaptation procedurehighly depends on the seizure frequency of the patient. At least five toten seizures must have occurred after the forecasting is activated towarrant proper adjustment of this stage. The adaptation requires the useof the external portable module 500 for data recording and communicationwith the supervisory control. The initial adaptation is performed atperiodically discrete times when the patient connects the externalportable module 500 to the high level supervisory control 400, either asa direct connection to the computer where the master supervisory programthat manages the high level control resides, or to another externaldevice or computer that will transmit and receive information to andfrom the supervisory control computer via the Internet. The initial timespans between consecutive communications with the supervisory controlmay be around two days. After this initial adaptation/learning procedurethe system can start the third stage or controlling stage, where theimplantable close-loop control is activated. The adaptation willcontinue but at longer time spans that can be linked to a doctor or aspecialist check-up appointment where the supervisory control re-tunessetpoints and readjusts parameters according to the most recentinformation archived in the knowledge base. Occasionally, the doctor orspecialist can request at his discretion that the patient stores thedata into the supervisory control at the coordination layer continuouslyfor a week or the time they considered, or only at the specific timesbrain events or seizures occur, in which case, the patient ispermanently wearing the external portable module, but he only downloadsthe data when a brain disturbance occurs, either a seizure, an aura, orany other brain event. In this form, the brain event and two days ofconsecutive data before the event occurred are stored in theintermediate storage device. This allows the master program and/or thespecialist to reexamine the scenario, to consider new variables notobserved previously, and to re-tune the system in a similar way that acar tune-up is conducted. This adaptation ability accounts for long-termphysiological changes and for environmental changes, which assures thelong lasting capacity of the apparatus. Furthermore, the highest layer(research layer) 600 allows the specialist to conduct innovativeresearch and explore new horizons regarding brain events that canprovide new evidence to explain the mechanisms that operate during thesedisturbances and brain diseases. In other words, this invention alsoacts as a research tool for the particular brain events that are beingforecasted, without modifications to the apparatus or additional burdento the patient.

3. Third Stage: Controlling

The third stage is basically concerned with the control part of thesystem. It comprises a multi-level control illustrated in FIG. 2, thatincludes a regulatory (low level) control, a coordinating (high level)control, and a research (development level) layer from whichmodifications to the control laws in the lower layers can be derived.The high level control is provided by the supervisory control at thecoordination layer that operates in two levels, i.e., an automatic and asemiautomatic level. The low level control is provided by asupervisory-regulatory control 300 that resides within the implantabledevice and whose main tasks are the internal parameter adjustments ortuning 320, and the brain feedback stimulation 330, 340 to avoid ormitigate seizures. The brain feedback stimulation is provided by thestimulation unit 340 shown in FIG. 8. In this figure, the outputs of thestimulation unit 340 (electrical, magnetic, chemical, sensorial orcognitive stimulation variables) are directly fed back into the brain,altering the net brain activity and becoming the manipulated variables341-345. These manipulated variables are adjusted dynamically to keepthe controlled variables at their set points or below the set points.The controlled or output variables, which quantify the performance orquality of the final product are the probability of having a seizure inone or more time frames and the overall system performance metric. Theprobability of having a seizure can be a vector if more than one timeframe is used to estimate this probability. The stimulation block 340can be manually deactivated by the doctor or an authorized individual.When this block is deactivated, the apparatus becomes a pureforecasting/warning device, which is the state it has at initialization.Two levels of stimulation are available in the stimulation block 340depending on whether the control action or manipulated signal isactivated by the patient or by the device. Stimulations at the patientlevel include sensory/perceptive and cognitive stimulations, and at thedevice level include electrical, chemical, magnetic, and certain typesof sensory stimulation. This stage comprises the following steps.

Step 1: The low level supervisory control or implanted closed-loopcontrol 300 is activated manually from the external portable module 500or automatically via the high level supervisory control 400 through theexternal portable module.

Step 2: The controlled variables given by the probability of having aseizure for one or more time frames and the overall system performancemetric are used as control feedback signals by the low level controllerto prevent seizures by producing an intermittent electrical, chemicaland/or magnetic stimulation 341-343, or by instructing the patient to gointo a previously specified sensory or cognitive procedure 344, 345. Theduration, magnitude, type, and frequency of the electrical, chemical, ormagnetic stimulation is adjusted to maintain the controlled variables attheir set-points or range-points, as well as the duration, intensity,and type of sensory or cognitive stimulation. Prediction times on theorder of minutes to an hour can be obtained with this invention (seeFIGS. 15-17, 25-26), and in the worst cases on the order of seconds(FIG. 20). This represents ample time to avoid a seizure by releasingsmall quantities of a drug (chemical stimulation), by electricallystimulating focal points to ward off synchronized nerve impulses, bywearing a special helmet that provides a magnetic stimulation, bysolving high cognitive problems, or by experimenting with sensorystimulation such as music, flavors, images, tactile sensations, orodors. The intensity as well as the level of invasiveness of thestimulus gradually increases with the probability of having a seizure.This multi-therapeutic approach is described in more detail in theco-pending patent application Ser. No. 09/693423. However, a descriptionof several invasive intervention measures is also described herein.

The intelligence structure of this invention is coupled to an array ofinterventions based upon electrical stimulation, chemical infusion andsynthesis of artificial neuronal signals to counteract developingseizures as precursors build over time. The intensity of intervention,modality of therapy and spatial distribution of therapy are all adjustedas the probability of seizures increases over time. A guiding principleof these interventions is that the most benign forms of therapy areinitiated relatively early in seizure generation and over a relativelysmall region of the brain, so as to cause little or minimal disruptionof normal activity when the probability of seizure onset is relativelylow. This will allow intervention to be triggered by predictionthresholds with high sensitivity (e.g., very low false negative rate) atthe cost of a relatively low specificity (e.g., relatively high falsepositive rate). As the probability of seizures increases, therapeuticstimuli are increased in intensity, duration, frequency of delivery, andare delivered over a wider area of the brain. Since patterns of seizureprecursors and their spread in space and time leading up to seizures aremapped and used to train the device on each individual patient, therapyis delivered over broader areas, just ahead of the anticipated region ofspread, as seizure precursors develop, if they do not respond to earliertreatment. In this scheme, therapy can be delivered locally, in theregion of onset, in a distribution surrounding the region of onset,isolating it from recruiting adjacent regions of the brain andspreading. Therapy can also be delivered locally and/or remotely insubcortical regions such as the thalamus, basal ganglia, or other deepnuclei and regions, escalating in intensity, type of stimulus anddistribution of action, as seizures progress. This same principle isapplied to therapeutic intervention if electrical seizure onset takesplace, effecting treatment in the general region of onset, in deep brainstructures which modulate the behavior of the seizure focus, or bothsimultaneously.

Interventions can include the following: (1) rhythmic electrical pacing,which changes in frequency, intensity and distribution as theprobability of seizure onset reaches a threshold and increases; (2)chaos control pacing; (3) random electrical stimulation to interferewith developing coherence in activity in the region of and surroundingthe epileptic focus; and (4) depolarization or hyperpolarization stimulito silence or suppress activity in actively discharging regions orregions at risk for seizure spread. This activity can also be deliveredto numerous electrode sites to create a type of “surround inhibition” toprevent progression of seizure precursors. These stimuli can also bedelivered sequentially in a “wave” that sweeps over a region of tissue,so as to progressively inhibit normal or pathological neuronal functionin a given region(s) or tissue, including cortical and subcorticalregions.

The principle of altering and developing therapy in response to thechanging probability of seizure, and/or the detection of specific eventsin seizure evolution, including electrical seizure onset and spread, isalso applied to the delivery of chemical therapy. In this fashion,active therapeutic agents are infused or otherwise released in the rainregions where seizures are generated, or to where seizures may spread.As seizures become more likely, the amount, concentration or spatialdistribution through which a chemical agent is delivered are allincreased. As with electrical or other therapeutic interventions,patterns of delivery can include infusing a drug directly in theepileptic focus, in an area surrounding it, or to regions involved inearly spread, or to more central or deep brain regions, which maymodulate seizure propagation. These same therapeutic principles apply todistribution of maximal therapy when electrical seizure onset isdetected, including distributing therapy to regions where seizures areknown to spread and propagate. Last-minute treatment may include releaseof larger amounts of drug into the cerebrospinal fluid (CSF) space forcirculation over wide regions of the brain or into the cerebralcirculation. Other types of pharmacological agents may also be used inthis scheme, such as agents which are activated by oxidative stress,which may themselves increase the concentration and distribution of anactive therapeutic agent as seizure precursors evolve and theprobability of seizures increases.

Therapy may also include delivery of stimuli, electrical, chemical orother, to peripheral or central nerves or blood vessels, in a gradedfashion, as the probability of seizures increases, building up totherapy of maximal intensity at the detection of electrical seizureonset. Therapy may also include sensory stimulation (touch, temperature,visual, auditory etc.).

Finally, therapy may consist of synthesized, artificial neuronal signalsdelivered in such a way as to disrupt electrochemical traffic on theappropriate neuronal networks including or communicating with the ictalonset zone. Examples of such interventions might include transmission ofsynthesized signals which increase the output of specific cellpopulations, such as inhibitory intemeurons, specific nuclear regions inthe thalamus or other deep structures.

Using any or all of these methods singly, or in combination, therapy isdirected toward preventing seizure onset, or isolating the developmentof seizures and their propagation so as to prevent or minimize clinicalsymptoms and the impact of these events.

Step 3: An evaluation is accomplished by the intelligent predictionanalysis/classification block 260 within the intelligent data processingunit 200, to estimate the prediction performance , by measuring whenpossible, key parameters such as prediction time frame threshold error(PTFTE), false negatives (FNs), false positives (FPs), averageprediction time achieved (APTA), seizure duration (D_(SZ)), etc. ThePTFTE is directly quantified from the number of FPs and FNs. It can bemeasured only when either the controlling block 300 is deactivated (nolow level control/no stimulation), or when it completely fails due to ageneral system failure, which implies that no electrical, chemical,magnetic, sensory, or cognitive stimulation is performed. When thestimulating system is deactivated, the apparatus is used for forecastingand not for controlling seizures. The prediction time frame threshold isthe adaptive probability threshold used to declare an oncoming seizurefor a particular time frame. In order to quantify a fault in theprediction time frame threshold, a measure of the achieved predictiontime is needed, and therefore, the seizure UEO detection is required.The achieved prediction time is measured as the elapsed time between themoment the adaptive probability threshold that declares a seizure orbrain disturbance is reached and the moment the UEO detection occurs.Among the several errors typically committed in this type ofmeasurement, the biggest error in the achieved prediction time is due tothe error in the UEO detection, but this error is within the range ofseconds. Fortunately, the seizure UEO detection does not entail anyadditional circuitry or programming, since the prediction algorithmsused to compute the feature vector also have the capability of seizureonset detection. The effects sensed and monitored through the selectedfeatures typically exhibit a more drastic variation as the seizureapproaches, reaching their maximum change during the ictal period nearto the UEO. This is logical and experiments conducted have proven thatin most cases, the feature vector can be used efficiently for seizureprediction as well as seizure detection (“Accumulated Energy Is aState-Dependent Predictor of Seizures in Mesial Temporal Lobe Epilepsy,”Proceedings of American Epilepsy Society, 1999, and “Fractal dimensioncharacterizes seizure onset in epileptic patients,” IEEE Int. Conf. onAcoustics, Speech, & Signal Proc., 1999). The probability of having aseizure is a continuously changing function of the time and the timeframe under consideration P_(TF)(Sz,t). If for a particular time frame(TF) considered, the probability of having a seizure P_(TF)(Sz,t)reaches the adaptive probability threshold value P₀ that declares anapproaching seizure, then a false positive (FP) is declared when a timeidentical to the TF under consideration has elapsed and no seizure hasoccurred, provided that the low level control is deactivated, anddisregarding if there are oscillations of P_(TF)(Sz,t) around P₀. Evenif P_(TF)(Sz,t) for that TF goes above the threshold and rightimmediately goes below, a FP must still be quantified. If P_(TF)(Sz,t)is above the threshold during time T_(up) longer than TF, then thenumber of consecutive and non-overlapping segments of TF duration thatfits into T_(up)+TF is equivalent to the total number of FPs that shouldbe quantified for that TF. Note that rather than fitting theseconsecutive and non-overlapping segments of TF duration into T_(up),they are fitted into T_(up)+TF because the FPs are measured into thisprediction framework such that the longer time P_(TF)(Sz,t) is above P₀without a seizure occurrence, the more FPs must be quantified. One FP isdefined in the ideal case, when P_(TF)(Sz,t) is above P₀ for an instantat time t₀, which mathematically will be described as aP_(TF)(Sz,t)=aδ(t−t₀), where δ(t−t₀) is a delta function at time t₀ anda≧P₀; in this case, one FP is quantified. IfP_(TF)(Sz,t)=aΠ(t−t₀,t−t₀−T_(up)), indicating that P_(TF)(Sz,t) is apulse of amplitude a, such that a≧P₀, and duration T_(up), such thatT_(UP)=1.25 TF then the number of FPs is quantified as 2.25. Consideringthe usual definition of a FP, it should be an integer number; however,the definition provided in this invention penalizes this type of errorwith more accuracy. Otherwise, T_(up)=1.25 TF and T_(up)=0.65 TF wouldyield the same integer number of FPs. If P_(TF)(Sz,t) is again a pulseas mathematically described earlier, with amplitude a, such that a≧P₀,and duration T_(up), such that T_(up)=1.25 TF, but this time a seizureindeed occurred at time t=t₀+t₁ such that t₀+t₁=1.1 TF, then one FP hasto be quantified even though the seizure occurred, because from thebeginning of the pulse until time TF no seizure had occurred. FPs arequantified only when the controlling block is deactivated; otherwise,the activated control produces a stimulation to avoid the seizures orbrain disturbances and the FPs will be unnoticed since they will beconfused with avoided seizures. The FNs are quantified in threedifferent ways. The first way occurs when the achieved prediction timeas defined earlier is zero or less than one tenth of the time frameTF/10 for which P₀ is activated. The second way occurs whenP_(TF)(Sz,t)<P₀, but a seizure occurrence is indicated by the patientthrough the patient input channel via the external portable module. Thethird way occurs when the supervisory control at the semiautomatic levelindicates a seizure occurrence from direct inspection of the stored databy a specialist or doctor. The false negatives (FNs) are quantified overtime to determine the prediction performance.

Step 4: The overall system performance metric is computed from theprediction performance and from the prevention performance. Along withthe prediction performance, a prevention performance is determined bycounting and storing the number of prediction-stimulations that wereperformed but failed to stop a seizure with respect to the total numberof prediction-stimulations. This provides an indication of the failureand success rates of the stimulation block (lower level control) 340. Inaddition, the seizure frequency over time, the average seizure durationover time, the “aura” frequency over time, etc. are used to quantify theprevention performance. This is an important statistic since a reductionin the patient frequency of seizures after the device is implanteddetermines the apparatus performance. The overall apparatus performanceis quantified in a metric that is a linear or a nonlinear combination ofat least one of the performance measures assessed and is used incombination with the probability of having a seizure as feedback controlsignals. Also the system can utilize each of the measures that are usedto compute the overall system performance (FPs if the stimulation unitis deactivated, FNs, patient seizure frequency, aura frequency,prediction-stimulation failures, total number ofprediction-stimulations, D_(SZ), APTA, etc.), or the predictionperformance and the prevention performance as a feedback vector, ratherthan using the overall apparatus performance directly.

Step 5: The stimulation block 330 and 340, contained in the low levelcontroller 300 receives as input, the control feedback signals orprobability of having a seizure within one or more chosen time framesproduced in the forecasting section as well as the different measuresused to compute the prediction and prevention performances. Theinformation contained in this feedback vector is used to adjust each ofthe stimulation block 340 parameters (intensity, duration, andfrequency) and to determine the start time and the type of stimulationdepending on the patient and on the seizure probability time frameactivated and the probability value itself, and the type of stimulationwithin that kind, i.e., if a sensory stimulation of a visual kind isused, the types can be relaxing movie or picture, funny movie orpicture, scary movie or picture, suspense, etc. Similarly, for each ofthe kinds of stimulations available 341-345. Note that thesensory/perceptive and cognitive kinds of stimulations have sub-kindssuch as visual, auditory, tactile, smell, and taste, within the firstcategory or kind; and reading, mathematical computation, and logicreasoning problems, within the cognitive kind.

Step 6: Initially, the feedback control law and the knowledge baseupdate law are determined as a basic linear relationship between thevariables that are fed back and the parameters that need to be adjustedaccording to the desired goal of a seizure-free patient with minimuminvasion. Through the subsequent on-line tunings the parameters withinthe control laws, as well as the control laws themselves, will beupdated as time progresses. Using intuition, logic, and previousavailable knowledge, mild interventions will be used first for longerTF. As the TF activated becomes smaller and/or the mild interventions donot decrease the probability of seizure, strongerinterventions/stimulations have to be used. Mild interventions are thenon-invasive kinds such as cognitive or sensory/perceptive stimulations.The duration of the mild stimulation or intervention D_(st), willinitially be proportional to the weighted average of the probabilitiesof having a seizure for each TF, where the weighting factor in each caseis given by a stimulus factor. Mathematically, D_(st) can be expressedas D_(st)=1/N_(TF)Σ/_(TF) k_(st,TF)P_(TF)(Sz,t)/TF, where NTF is thenumber of TFs utilized in the probability vector, and k_(st,TF) is aspecific stimulus factor initially determined as a function of previousavailable information such as the frequency of seizures, frequency ofauras (if available), seizure duration, and type of seizure. Note thatk_(st,TF) depends on the TF and on the kind and type of stimulus used(st). Once the on-line operation is started and the controlling sectionis activated, this specific stimulus factor is updated using FNs,updated frequency of seizures, updated frequency of auras (ifavailable), prediction-stimulation failures, total number ofprediction-stimulations, D_(Sz) achieved, APTA. The number ofstimulation kinds available depends on the patient's evolution,initially all the stimulations proposed are used, but the adaptationprocedure at all the control layers will progressively reduce andwithdraw those stimulations with a high rate of failure. If more thanone kind of stimulation is maintained, simultaneous stimulations can beapplied according to the co-pending patent application Ser. No.09/693423. For stronger or invasive stimulations, a similar control lawis used initially for each of the parameters required. For example, theelectrical stimulation requires five parameters to be assessed. Theintensity and duration are determined using the same expression for theduration of a mild intervention, the difference is in the specificstimulus factor that changes in each case. The other parameters arestarting stimulation time, type of electrical wave to apply, andfrequency (if there is a frequency associated with the type ofwaveform). The type of waveform is initially decided as a basic waveformthat is easily generated and preferably with discrete values. In mostcases, a pulse or half period of a square wave is used as the initialshape, but as the system gathers information from the patient, otherwaveforms can be tested if results are not satisfactory with the initialwaveform. A similar criteria applies for the frequency of the waveform,initiating the control with a half wave per chosen duration. Thestarting stimulation time is determined by the time an adaptiveprobability threshold is reach by the actual probability of having aseizure for each specific TF. Each TF adaptive probability threshold isspecific for each stimulus and is a function of the FNs, updatedfrequency of seizures, updated frequency of auras (if available),prediction-stimulation failures, total number ofprediction-stimulations, D_(Sz) achieved, type of seizure, and APTA.

Step 7: Relying on the research and coordination layers of thesupervisory control 600 and 400 respectively, it is expected that thecontrol laws will adapt to internal and external changes and evolve overtime to accomplish the desired optimal equilibrium point where theseizure frequency reaches zero with less invasive and minimalstimulation, such as sensory/perceptive and cognitive. However, thereare still many obscure issues regarding how the stimulations influencethe patient. As the research and coordination layers (FIG. 2) update theincoming information, the interaction of the doctor, specialist and/orscientist with these two layers progresses, and the development level600 (FIG. 2) provides enhanced control schemes to the lower layers, theequipment performance is enhanced over time.

Step 8: Subsequent adaptive tunings of the internal system featureparameters, additional features (in case they are available), andanalysis/classification parameters are performed in this step, based onthe combined information of the control feedback signal and the overallperformance measures achieved by the system (FIGS. 8, 9, and 10).

Step 9: The device has the option of reading information introduced bythe patient by using the external portable module via the communicationlink shown in FIG. 4. The patient input channels 540 can be activatedvia the keypad, allowing the entrance of important patient informationthrough different channels designated for each specific task. Wheninformation supplied by the patient is available, it is incorporated asan additional feature into the feature vector. In this form, the patientcan provide additional information to the system through these channels.When he feels an aura he can press a button; when he or an individualobserving him considers that a seizure is occurring, another button orcombination of buttons can be pressed. The patient input channels 540can be activated or deactivated directly in the external portable module500, as well as many other options that the system offers.

Step 10: When the input channel of the external portable module 500 thatprovides the information regarding the patient aura sensation isactivated, the system automatically adjusts itself to consider the newavailable information for the seizure probability assessment, accordingto pre-programmed parameters adjusted to each individual patientautomatically by the control feedback signals, or manually by the doctoror expert.

Step 11: If the channel of the external communication unit 510 receivingthe information regarding the occurrence of a seizure is activated, thenthis information is used in conjunction with the preictal and ictal datarecorded to evaluate the system prediction performance. Among others thefalse positives, false negatives, and prediction times are used toassess the system performance.

Step 12: The system performance evaluation is always an option that canbe activated by an authorized person. Two different system performanceevaluations are accomplished automatically. One at the regulatoryfeedback control level and the other at the supervisory control level.

Another embodiment of the invention includes using other input signalsin the system such as blood pressure, heart rate, body temperature,level of certain chemical substances in important organs, dilation ofpupils, eye movements, and other significant physiological measures.

SYSTEM PROCESSING

The present invention delineates a patient-specific systematic approachfor seizure prediction or early detection of UEO. The methodologyfollowed is a typical approach used in artificial intelligence andpattern recognition. But in this invention, these methods are applied tothe computational neuroscience field with adaptations to the specificconditions of the brain event or seizure prediction/detection problem,the detection as a consequence of the prediction and for performanceevaluation purposes.

FIG. 1 depicts the architecture on which this invention is based. As canbe observed in this figure, once the data is generated, a preprocessingstage is required to reduce the noise and enhance the signal for betterclass discrimination with minimum distortion and for appropriate datafusion. The preprocessed and fused data goes into the processing block,where the feature extraction and selection is performed. Afterappropriate features have been extracted and selected (optimized), anintelligent tool such as a neural network, fuzzy logic, or a combinationof both achieves the intelligent prediction classification/analysis.Following this, a closed-loop control is activated and driven by theprobability of having a seizure and by the overall system performancemeasures.

In prediction/detection problems the feature extraction and selection isconsidered to be the key aspect necessary to achieve a correctclassification and usually is the most critical. The intelligentprediction analysis/classification possesses a general and well definedoperation once an effective set of features is found (see co-pendingapplication Ser. No. 09/693423), but there is no straightforwardprocedure for determining the best set of features. However, FIG. 5presents a flow chart with the procedure used in this invention for theselection of the best-feature vector.

Feature Extraction

The feature extraction is performed through a running window method, asillustrated in FIG. 7. The shaded area is the sliding observationwindow, which moves through the data as the features are computed. Thedata points inside this sliding window are used for feature generationas the window moves through the data. Therefore, this observation windowis continually collapsed into a feature vector by means of formulas andalgorithms that take preprocessed and fused input signals and producescalar quantities as outputs, which then become the components of thefeature vector.

A feature library consisting of a large set of candidate features hasbeen developed for feature extraction and selection. When following thefeature parametertuned approach, an initial pre-selection of thefeatures to be extracted is performed, guided by a combination ofknowledge characteristics, intuition, and brainstorming. Once a largegroup of features is pre-selected, the features are computed. Two levelsof features are defined at this point: instantaneous features andhistorical features, which are sketched in FIG. 12. The instantaneous orhistorical features can be limited to the focus region or can bederived, as a spatial feature arising from the combination of differentregions within the brain, and not restricted to the focal area.

Instantaneous features are computed directly from the preprocessed andfused input signals through a running observation window. Historicalfeatures are “features of features” that require a second level offeature extraction, which entails the historical evolution of featuresthrough time. From this large set of instantaneous and historicalfeatures that are extracted (i.e., candidate features), the featureselection takes place.

The feature library developed contains more than 20 features. Itincludes a collection of custom routines to compute the features.Features from different areas or domains are extracted to explore a widespectrum of possibilities. Among the domains analyzed are time,frequency, wavelet, fractal geometry, stochastic analysis, statistics,information theory, etc. In the following, a description of thealgorithms, assumptions, and mathematical formulation for determiningthese features is presented in combination with some of the results.

Time Domain Features

The power, power derivative, fourth-power indicator (FPI), andaccumulated energy (AE) are amplitude-based features. The nonlinearenergy, thresholded nonlinear energy and duration of the thresholdednonlinear energy are based on an AM-FM demodulation idea firstintroduced by P. Maragos, et al. (“On Amplitude and FrequencyDemodulation Using Energy Operators”, IEEE Trans. on Signal Processing,vol. 41, No. 4, pp. 1532-50). Their calculations are provided below.

Average Power or Moving Average Power

Let the sequence x(n) be a preprocessed and fused input signal, then theinstantaneous power of x(n) is given by x²(n). Considering that asliding window is used, the power of the signal becomes the averagepower over the window mathematically defined as,${{P\lbrack n\rbrack} = {\frac{1}{N_{1}}{\sum\limits_{i = {{{({n - 1})}N_{1}} + 1}}^{{nN}_{1}}\quad {x(i)}^{2}}}},$

where:

N₁ is the size of the sliding window expressed in number of points, and

n is the set 1,2,3, . . .

The moving average of the power defined above is with zero overlap. Ifan overlap of D points is allowed, then the average power becomes:${{P_{D}\lbrack n\rbrack} = {\frac{1}{N_{1}}{\sum\limits_{i = {1 + {{({n - 1})}{({N_{1} - D})}}}}^{{n{({N_{1} - D})}} + D}\quad {x(i)}^{2}}}},$

where:

P_(D) is the average power or moving average of the power with D pointsof overlap.

FIG. 13 illustrates the average power for one seizure record from anepileptic patient. Similar results were found in another patients. Thisfeature was obtained using a window length of 1.25 sec. or equivalently250 points with an overlap of 0.45 sec. (90 points); however, theseparameters can be changed or adjusted to the patient.

Derivative of Power

The subtraction of consecutive samples of P_(D) (n) corresponds to adiscrete derivative of the average power, which can be expressed as

ΔP[n]=P _(D) [n]−P _(D) [n−1].

Accumulated Energy (AE)

The AE contains historical information and represents a discreteintegral of the power moving average over time. From the power recordsobtained from the expression for P_(D)[n], a new moving average windowof N₂=10 points or any other value determined to be suitable for theparticular patient, is slid through the power record with a 50% overlapor equivalently Da=5 points, and a new sequence is derived as thecumulative sum of these values. The following equation summarizes themathematical computation of the accumulated energy or integral of thepower for the specified band of time:${{AE}\lbrack k\rbrack} = {{\frac{1}{N_{2}}\lbrack {\sum\limits_{j = {1 + {{({k - 1})}{({N_{2} - D_{a}})}}}}^{{k{({N_{2} - D_{a}})}} + D_{a}}\quad {P_{D}\lbrack j\rbrack}} \rbrack} + {{{AE}\lbrack {k - 1} \rbrack}.}}$

This feature shows promising results for seizure prediction of UEO, ascan be seen from FIGS. 14, 15, and 16. These figures present theaccumulated energies for several one-hour records of IEEG as if they hadoccurred at the same time (same time axis), but this is just a way tocompare the behavior of one-hour baseline and pre-seizure records fromdifferent time moments. Note that the time labeled zero corresponds tothe UEO and the horizontal scale is in minutes. FIG. 14 illustrates theAE trajectories for all the awake IEEG records from an epilepticpatient. The continuous lines of higher final amplitude correspond toseizure records, and the dotted lines of lower ending amplitudecorrespond to baseline records. A clear separability between the seizureand baselines records is observed from around 18 minutes before the UEOin most of the records. FIG. 15 shows the AE trajectories after anormalization. The one-hour IEEG segments in this figure correspondagain to seizure and baseline records, but this time from both statesawake and asleep. The normalization performed on the AE trajectoriesallows comparison of awake and asleep records within the same reference.Again in this figure the preictal segments exhibit higher AE than thebaseline segments. Except for the lowest amplitude AE seizure record, aclear separation can be noticed around 20 minutes before the UEO. FIG.16 illustrates the normalized AE trajectories for 80 one-hour segmentsfrom five different patients. It is clear from this figure that theseizure AE trajectories are concentrated at the top of the baseline AEtrajectories. The observed behavior is similar in other patients. Thenormalization factor used over the AE was tuned for each patientaccording to an off-line procedure. The magnitudes of the non-normalizedAE trajectories were always higher in asleep records than in awakerecords, and also changed from one patient to another. However, afterthe normalization, the AE trajectories became within the same range ofvalues, preserving the relative differences within each patient.

Fourth-Power Indicator

The fourth power of the time series ΔP[n] is computed over a secondsliding window to accentuate the activity of higher-amplitude epochs inthe preprocessed and fused inputs, sufficiently more than the activityof lower-amplitude epochs. The fourth-power indicator (FPI) is thengiven by,${{{FPI}(n)} = {\frac{1}{N_{2}}{\sum\limits_{i = {n - N_{2} + 1}}^{n}\quad {\Delta \quad {P(i)}^{4}}}}},$

where N2 is the size of the new sliding window over the time seriesΔP[n]. This second sliding window is chosen equal to 10 points, but canbe another value. FIG. 17 shows the FPI in one of the patients analyzed.The prediction ability of this feature can be noticed in this figure. Inthis figure, the FPI from four preictal and four interictal IEEGsegments is shown from top to bottom respectively. The dotted horizontalline on each plot represents a hypothetical threshold that whensurpassed is considered as an indication of pre-seizure stage. The lineswith arrows are used to point out the sleep-awake cycles (sac), theletters in the graph have the following meaning: a stands for awake, dfor drowsy, and s for asleep. There are moments during the first fourpreictal segments when the hypothetical threshold is surpassedsuggesting a relationship between this feature and the oncoming seizureevent. Only one baseline record yields false alarms (the bottom one).

Average Nonlinear Energy or Moving Average Nonlinear Energy

The nonlinear energy (NE) operator arises in the area of signalprocessing and communications. It was first proposed by Maragos et al.(“On Amplitude and Frequency Demodulation Using Energy Operators”, IEEETrans. on Signal Processing, vol. 41, no. 4, pp. 1532-1550) as an AM-FMdemodulator and later applied as a spike detector. The square root ofthe NE operator was shown to approximately track the product of theamplitude envelope and the instantaneous frequency of sine wave signalswith timevarying amplitude and frequency. This definition was made byMaragos et al. under the assumptions of: (1) the bandwidth of AM or FMinformation signals is smaller than the carrier frequency; (2) noisefree signals; (3) AM modulation is less than 100%, and FM modulation isless than 1 (ω_(m)/ω_(c)<1, where ω_(m) is the modulating frequency andω_(c) is the carrier frequency). Therefore, implicit assumptions, whenusing this feature, are that the brain signals can be modeled as asummation of sinusoids with different amplitude and frequencymodulation, where the bandwidth of each AM or FM part is smaller thanthe corresponding carrier. A possible physiological interpretation is toconsider each brain signal as the sum of several nonlinear time-varyingoscillators within the terminal contact area of the electrode. As isknown, neuron signals are FM modulated; therefore, the many thousands ofneuron voltages recorded can be divided into groups representing eachoscillator. Neuron signals with the same carrier frequency and FMmessage will belong to the same group (same oscillator); and hence, willadd up their tuned signals to produce the oscillator output. Thus,obviously, each of the oscillators would represent the response producedby thousands of neurons oscillating at the same frequency andtransmitting the same FM information. There will be as many oscillatorsas there are different carrier frequencies and FM messages present. TheAM component is determined by the number of neurons contributing to eachoscillator. The more neurons that are tuned to the same frequency, thelarger is the amplitude of the oscillator, creating the effect of an AMmodulation. This hypothesis of multiple neuron responses adding up toeach oscillator output seems reasonable considering that the NE operatormakes no assumptions regarding the source of the AM and FM signals.

The NE operator is computed according to the expression:

NE[n]=x ² [n]−x[n−1]x[n+1].

The NE operator as well as the features derived from it, areinstantaneous features in the sense that they provide one value for eachvalue of the original data. Therefore, the values of the nonlinearenergy feature are subject to a second level of extraction where theyare weighted with a rectangular window or any other window shape; theirmean value is then calculated and called average nonlinear energy. Thelength of this window is optimized for the data set of each patientaccording to the procedure described in FIG. 18 and illustrated for oneof the features in FIG. 19. The average nonlinear energy is obtained asfollows,${{ANE}\lbrack k\rbrack} = {\frac{1}{N}{\sum\limits_{n = {1 + {{({k - 1})}\quad {({N - D})}}}}^{{k{({N - D})}} + D}\quad {{NE}\lbrack n\rbrack}}}$

where:

ANE[k] is the average nonlinear energy at time k,

N is the window length optimized for the data of each particularpatient,

D is the overlap in number of points,

k is a discrete time index equal to 1, 2, 3, . . .

It is observed that instead of using a rectangular window, by utilizingan exponential window, the results can be enhanced. This occurs becausethe feature values nearer to the seizure onset (more recent ones) areemphasized more than the values that occurred earlier. The exponentiallyweighted average nonlinear energy (WANE) is found by:${{{WANE}\lbrack k\rbrack} = {\frac{1}{N}{\sum\limits_{n = {1 + {{({k - 1})}{({N - D})}}}}^{{k{({N - D})}} + D}\quad {{{NE}\lbrack n\rbrack}{w\lbrack n\rbrack}}}}},{{w\lbrack n\rbrack} = {\frac{f_{s}}{N}\quad ^{{- n}/{({2f_{s}})}}}},$

where:

w[n] is the exponential window used,

fs is the sampling frequency of the data signal (typically 200 Hz). FIG.20 shows the WANE signal for a pre-seizure and baseline record from thesame patient. In this figure two bursts of enery can be observed around25 and 5 minutes before the UEO in the preictal segment not present inthe baseline segment. This feature yielded similar results across thepatients studied.

Thresholded Nonlinear Energy (TNE)

From the above expression for average nonlinear energy, the thresholdednonlinear energy (a binary sequence) is derived as follows:

TNE[n]=θ(NE[n]>th ₁),

where th₁ is a threshold that is adjusted depending on the patient asindicated in the following expression, and θ is the Heaviside functionalso known as the step function.${{th1} = {\frac{C}{N_{B}N_{k}}{\sum\limits_{k = 1}^{N_{B}}\quad {\sum\limits_{i = 1}^{N_{k}}\quad {x_{k}(i)}}}}},$

where N_(B) is the number of records, N_(k) is the number of points ineach record, x_(k)(i) is the ith value of the NE feature on record k,and C is a constant empirically selected to be 1.5 after an ad-hocestimation. This constant can be adjusted on a patient basis.

Duration of Thresholded Nonlinear Energy

The duration in an “on” state of the time series TNE(n) is determined bycounting the number of consecutive ones, and creating a new sequence orfeature, whose values are zero except at the end of stream of ones inthe TNE(n) sequence, where this new sequence takes a value equal to thenumber of consecutive ones found in that stream of the TNE(n) sequence.FIG. 21 illustrates how this feature can provide encouraging resultsfrom its behavior in eleven one-hour segments that indicate a cleardistinguishability between preictal and no preictal portions of data upto 50 minutes prior to the UEO. Further analysis is required todetermine how long in advance this difference becomes clear.

Ratio of Short and Long Term Power or any Other Feature

This feature corresponds to a second level of feature extraction whereonce the average power is obtained, two more moving averages of thepower are calculated over time for different sliding window sizes. Inone case the window length is long and in the other it is shortcorresponding to the long term power and short term power, respectively.The ratio of these two is taken and assigned to the current time thefeature is being computed. A variation of this feature includesdetermining when the short term power goes above or below an adaptivethreshold obtained from the long term power. The same ratio or thresholdcrossing between a short and a long term feature can be computed for anyother feature from any of the domains mentioned in this invention. Theduration and magnitude by which the short term feature exceeds theadaptive threshold can also be quantified in a third level ofextraction. FIG. 22 shows the times as well as the magnitude by whichthe short term energy of the 4^(th) wavelet coefficient exceeded the 20%value of the long term energy of the same coefficient. These resultswere computed over five one-hour preictal IEEG segments from oneepileptic patient. The continuous line indicates how a continuousadaptive threshold classifier based on a duration and magnitude of thedifference between the short and long term energy can provide aprediction for a time horizon around two minutes utilizing only thisfeature. It is expected that when more features are added into theanalysis, the performance will improve. Twelve one-hour baselines wherealso analyzed yielding a total of 8 FPs under this raw classificationscheme, which was used only for evaluation purposes.

Fractal Dimension of Analog Signals

The fractal dimension (FD) of a waveform can be computed over time byusing Katz's algorithm, with very good results for early detection ofthe UEO. The FD of a curve can be defined as:$D = \frac{\log_{10}(L)}{\log_{10}(d)}$

where L is the total length of the curve or sum of distances betweensuccessive points, and d is the diameter estimated as the distancebetween the first point of the sequence and the point of the sequencethat provides the farthest distance. Mathematically speaking, d can beexpressed as:

d=max (x(1),x(r)).

Considering the distance between each point of the sequence and thefirst, point r is the one that maximizes the distance with respect tothe first point.

The FD compares the actual number of units that compose a curve with theminimum number of units required to reproduce a pattern of the samespatial extent. FDs computed in this fashion depend upon the measurementunits used. If the units are different, then so are the FDs. Katz'sapproach solves this problem by creating a general unit or yardstick:the average step or average distance between successive points, a.Normalizing distances in the equation for D by this average results in,$D = \frac{\log_{10}( {L/\underset{\_}{a}} )}{\log_{10}( {d/\underset{\_}{a}} )}$

Defining n as the number of steps in the curve, then n=L/a, and theprevious equation can be written as:$D = {\frac{\log_{10}(n)}{{\log_{10}( \frac{d}{L} )} + {\log_{10}(n)}}.}$

The previous expression summarizes Katz's approach to calculate the FDof a waveform.

A great deal of repeatability has been observed with this feature andwith the FD of binary signals across records from the same patient andeven across patients (“Fractal Dimension characterizes seizure onset inepileptic patients”, 1999 IEEE International Conference on Acoustics,Speech, and Signal Processing, by Esteller et al.).

Fractal Dimension of Binary Signals

The FD of digital or binay signals is calculated using Petrosian'salgorithm. It uses a quick estimate of the FD. Since waveforms areanalog signals, a binary signal is derived from the analog input signalby obtaining the differences between consecutive waveform values andgiving them the value of one or zero depending on whether or not theirdifference exceeds a standard deviation magnitude or another fixed oradjustable threshold. The FD of the previous binary sequence is thencomputed as:$D = \frac{\log_{10}n}{{\log_{10}n} + {\log_{10}( \frac{n}{n + {0.4N_{\Delta}}} )}}$

where n is the length of the sequence (number of points), and N_(Δ) isthe number of sign changes (number of dissimilar pairs) in the binarysequence generated.

Curve Length

Inspired by Katz's definition of FD, the curve length is a feature thatresembles the FD but runs faster because it is easier to implement inreal time. It is computed as follows:${{CL}(n)} = {\sum\limits_{k = n}^{n + N}\quad {{abs}\lbrack {{x( {k - 1} )} - {x(k)}} \rbrack}}$

where CL(n) is the running curve length of time series x(k), N is thesliding observation window, and n is the discrete time index. Thisfeature plays an important role for early detection of seizure onsets.

Frequency Domain Features

This category includes all features that contain some informationregarding the frequency domain, such as frequency content of the signal,frequency content in a particular frequency band, coherence, ratio ofthe frequency energy in one band with respect to another, crossings ofthe mean value in the power spectrum or in the time series, etc.

Power Spectrum

The spectrum is estimated using Welch's average periodogram, which isthe most widely used periodogram estimation approach. Welch's averageperiodogram is given by,${{{\overset{\bigwedge}{P}}_{W}(f)} = {\frac{1}{P}{\sum\limits_{p = 0}^{P - 1}\quad {{\overset{\bigvee}{P}}_{xx}^{(p)}(f)}}}},$

where:${{{\overset{\bigvee}{P}}_{xx}^{(p)}(f)} = {\frac{1}{UDT}{{X^{(p)}(f)}}^{2}}},{U = {T{\sum\limits_{n = 0}^{D - 1}\quad {w^{2}\lbrack n\rbrack}}}},$

${{X^{(p)}(f)} = {T{\sum\limits_{n = 0}^{D - 1}\quad {{x^{(p)}\lbrack n\rbrack}{\exp ( {{- j}\quad 2\pi \quad {fnT}} )}}}}},\quad {{x^{(p)}\lbrack n\rbrack} = {{w\lbrack n\rbrack}\quad {x\lbrack {n + {pS}} \rbrack}}},$

P is the number of sub-segments analyzed inside each input segment,

0<p<P−1 is the index range of segments,

f is the frequency,

D is the length of the periodogram window,

w[n] is the Hamming window,

x^((p))[n] is the weighted pth sub-segment,

x[n] is the data segment,

T is the sampling period,

S is the number of samples shifted as the window moves through the inputsegment.

The power spectrum is computed using the running observation window tovisualize the spectrum changes over time. Even though this feature isevaluated to characterize the bandwidth of the IEEG signals and tocompare it during ictal, preictal and interictal epochs, it is reallyused to derive the power on different frequency bands as describedbelow.

Power on Frequency Bands

Once the power spectrum is estimated, the power on four frequency bandscan be analyzed: delta band (lower than 4 Hz), theta band (between 4 and8 Hz), alpha band (between 8 Hz and 13 Hz) and beta band (between 13 Hzand 30 Hz). The power on each band is computed as the area under thespectrum for the corresponding frequency band (i.e., the integral ofeach band). The following equation represents the computation:${P_{T} = {\frac{1}{P_{T}}{\sum\limits_{k = f_{1}}^{f_{2}}\quad {X(k)}}}},$

where Pi is the power on the frequency band i, i can be either: delta,theta, alpha or beta band, f₁ and f₂ are the low and high frequencyindices of the band under consideration, k is the discrete frequencyindex, X(k) is the power spectrum, and P_(T) is the total power(integral of X(k) ). FIG. 23 illustrates the power on the frequency bandbetween 8 and 13 Hz (alpha) for a 50-minute preictal segment and abaseline segment. There is a clear difference in the power in thisfrequency band that between the two segments is also observed in theother segments analyzed. Around three minutes before the UEO a peakvalue is reached in the power of this frequency band (see FIG. 23).

Coherence

This is the signal processing name for the cross-correlation between twofrequency spectra. It is calculated to explore the issue raised by someresearchers, regarding a frequency entrainment or neural synchronizationbetween the focal area and other cortical sites prior to seizure onset.Channels from the focal region and other cortical sites of the brainhave been reported to exhibit some alignment in their phases fordifferent features as the seizure approaches. The coherence between thefocal channel and its homologous contralateral site is a good method foranalyzing neural synchronization. It is computed using a practicalmethod to determine the coherence between two signals, as indicated by${{C_{xy}(k)} = {\prod\limits_{k}\quad {\frac{P_{xx}(k)}{\max\limits_{i}\{ {P_{xx}(i)} \}}\frac{P_{yy}(k)}{\max\limits_{i}\{ {P_{yy}(i)} \}}}}},$

where Pxx is the power spectral density of x[n], and Pyy is the powerspectral density of y[n]. Note that C_(xy) is the vector given by theproduct of each frequency value of the maximum normalized power spectraldensity of x, max{P_(xx)(i)}, and the maximum normalized power spectraldensity of y, max{P_(yy)(i)}.

Mean Crossings

This feature counts the number of times the signal crosses the meanvalue of the window segment under analysis. As the running window slidesover the data, the number of crossings is calculated for each window.

Zero Crossings

The number of times the input signal crosses the zero value is countedwithin a pre-defined sliding observation window.

Wavelet Domain Features

Intuitively, wavelet analysis can be considered as a variable-lengthwindowing technique. In contrast with the short-time Fourier transform,wavelet analysis can study phenomena that is localized in time. Thispossibility of associating a particular event characterized by afrequency component, a disturbance, etc., to a time span, is one of themajor advantages of wavelet analysis. Wavelets are waveforms of limitedduration with zero average value and a tendency to be asymmetric. Incontrast, sine waves have smooth and symmetrical shape and infiniteduration. The short-time Fourier analysis uses a time-frequency regionrather than the time-scale region used by wavelet analysis. While theFourier approach uses a fixed window length that determines theresolution, in the wavelet analysis different window lengths are used(i.e, different scales), such that if the interest is in lowfrequencies, long time windows are appropriate and the opposite holdstrue for high frequencies. Another important concept that differentiatesboth types of analysis is that the Fourier transform breaks the datasignal into sine waves with different frequencies, and the wavelettransform breaks the data signal into shifted and scaled versions of themother wavelet used.

Spike Detector

There has been much discussion in the technical literature regarding thepossibility of a relationship between the presence of spikes on the EEGsignal and the occurrence of a seizure. Aimed toward testing thishypothesis, a spike detector has been developed. Initially, the NEoperator was computed, but only high amplitude spikes were detected,while low amplitude spikes were missed. The spike detector developed inthis invention utilizes a “prototype spike” as the mother wavelet. A setof spikes is randomly chosen from the patient, and by aligning andaveraging these spikes, a “prototype spike” is created and denoted asthe mother wavelet. This prototype spike is patient-tuned. Using therunning window method the inner product of this “prototype spike” andthe data is computed; once it reaches a value higher than apre-established threshold a spike is detected. FIG. 24 illustrates thebehavior of the spike detector for a segment of IEEG. From this figure,the spike detection is clear disregarding the spike amplitude. FIG. 25shows the spikes detected over time in eight one-hour records for fourpreictal and four baselines. Each vertical line denotes a spikedetected, the amplitude of the vertical line increases in proportion tothe excess of the inner product over the threshold. From this figure, itis clear how a second level of extraction computing the density ofspikes over another running window can distinguish between the preictaland baseline records tens of minutes prior to the seizure.

Density of spikes over Time

Using the spike detector developed, in a second level of extraction, athreshold is used to count the number of spikes that fall in the runningwindow over time. Results presented in FIG. 25 are encouraging toprocess the prediction of UEO with features of this nature.

Absolute Value of the 4th Wavelet Coefficient

Results with several wavelets have been examined by visual inspection.Among the mother wavelet results observed, the one that provided thebest visual separation between classes is the result obtained withDaubechies 4. The wavelet transform is run over the data for four ormore different scales. The scale that provides the bestdistinguishability between the preictal and the ictal class is selected.FIG. 26 presents 3.5-minute epochs of five seizures from the samepatient, extracted for the one-hour preictal records analyzed. A clearelevation starts between one minute and a half-minute before the seizureUEO. Using a basic threshold classifier a typical prediction time basedon only this feature would be around two minutes. Twelve one-hourbaseline segments were also analyzed using this feature in this patientwith the same simple threshold classifier, yielding only one FP. Thisseems to be a good feature to use as part of the feature library.Similar results were found across patients. This feature was initiallyanalyzed for 6-minute records instead of 1-hour records, because itgenerates one feature value for each IEEG sample, therefore, it has nodata compression. However, after the second level of extraction isconducted, where a running window is slid over the wavelet coefficientsand the mean of their absolute value is calculated for the featurevalues within each window, it resulted in data compression, whilepreserving most of the feature information and decreasing variability.The window length varied from patient to patient, depending on theresult of the window size optimization described below.

Statistics and Stochastic Processes

From the huge variety of features in the statistical domain, the meanfrequency index, the cross-correlation, and the coeffients of anautoregressive (AR) model are among the ones included in the featurelibrary of the present invention.

Mean Frequency Index

This is a measure of the centroid frequency, calculated as follows:${{mf} = {\frac{fs}{N}\frac{\sum\limits_{i = 1}^{N/2}\quad {( {i - 1} )x_{i}}}{\sum\limits_{i = 1}^{N/2}\quad x_{i}}}},$

where fs is the sampling frequency, N is the length of the IEEG segment,and x_(i) is the magnitude of the power spectrum.

FIG. 27 shows the mean frequency index of a seizure and a baselinerecord over time for a window length of 2000 points or equivalently 10seconds. The vertical line at time zero emphasizes the UEO time. It isclear from this figure, that the mean frequency can be a useful featurefor seizure UEO prediction/detection considering the small elevation ofthe average frequency as the seizure approaches which is not observedduring baseline periods away from ictal activity. Note the presence ofsudden periodic peaks above 20 Hz starting around 12 minutes before theseizure UEO. Other records in the database exhibited a similar behavior.This feature may be enhanced to increase the distinguishability betweenpreictal and no-preictal records, by either utilizing a differentshifting and window length, or by an additional processing at a thirdlevel of extraction, such as averaging, detection of the maximum valueover a third running window, ratio of short term versus long termfrequency index, etc. The clear issue is that the mean frequency indexmay provide a smoother feature with less variability over time andbetter results.

Cross-correlation

The consideration of this feature is motivated for the same reasons thatencouraged the coherence analysis between homologous contralateralchannels. The cross-correlation can reflect the degree of similaritybetween different channels, therefore, if a synchronization takes place,at some point before the seizure, this feature should be able to sense achange in that direction. The mathematical expression to compute thecross-correlation is given by${{R_{xy}(m)} = {\frac{1}{N}{\sum\limits_{n = 0}^{N - m - 1}\quad {{x\lbrack {n + m} \rbrack}{y^{*}\lbrack n\rbrack}}}}},\quad {{{for}\quad 0} \leq m \leq {N - 1.}}$

The running cross-correlation is computed for each sliding observationwindow used according to the window selection procedure summarized inthe flowchart of FIG. 18 and exemplified in FIG. 19. Each time thecross-correlation is calculated, a sequence of values is obtained forthe different lags, the maximum cross-correlation value from all thedifferent lags is the one kept over time for the generation of thisfeature.

Autoregressive (AR) Coefficients or Linear Prediction Coefficients

A time series model often used to approximate discrete-time processes isthe AR model whose time domain difference equation is:${{x\lbrack n\rbrack} = {{- {\sum\limits_{k = 1}^{p}\quad {{a\lbrack k\rbrack}\quad {x\lbrack {n - k} \rbrack}}}} + {u\lbrack n\rbrack}}},$

where p represents the AR model order. From this expression, it is clearthat the sample at time n is being estimated from the p previous samplesand the present input. In time series analysis where no input isavailable, u[n] is considered as white gaussian noise error between thereal present sample x[n] and the sample estimated without input. Aforward linear predictor is used to estimate the AR coefficients.Defining the error variance as

ρ=E{|e ^(f) [n]| ²}, where e ^(f) [n]x[n]−{circumflex over (x)} ^(f)[n],

then, the forward linear prediction estimate is${{\overset{\bigwedge}{x}}^{f}\lbrack n\rbrack} = {- {\sum\limits_{k = 1}^{p}\quad {{a^{f}\lbrack k\rbrack}\quad {{x\lbrack {n - k} \rbrack}.}}}}$

Computing the error variance from the error definition above, andsubstituting the forward linear prediction estimate yields the followingequation

ρ=r _(xx)[0]+r _(p) ^(H) a ^(f)+(a ^(f))^(H) r _(p)+(a ^(f))^(H) R_(p−1) a ^(f),

where:

a^(f) is a vector with the AR coefficients,

r_(p) is a vector w ith the autocorrelation for lags 1 to p,

and R_(p−1) is the autocorrelation matrix,

H represents the conjugate transposed.

The AR coefficients can be found by minimizing the last equation.Preliminary results suggest this feature has potential for prediction.

Information Theory Features

Features from the information theory domain are available in the featurelibrary, including the entropy as originally defined by Shannon, and themutual information function. It has been hypothesized that the level oforganization changes before, during and after a seizure; thus, thesefeatures must be analyzed to explore this possibility.

Entropy

Entropy is a measure of “uncertainty,” and is heavily used in theinformation theory field. The more uncertainty there is regarding theoutcome of an event, the higher is the entropy. The entropy is computedby using:${H = {- {\sum\limits_{i = 1}^{20}\quad {{{pdf}(i)}{\log_{2}( {{pdf}(i)} )}}}}},$

where pdf in this setting stands for the probability distributionfunction. It is found by dividing x (i.e., IEEG data segment) into 20different amplitude containers, determining how many values of x are ineach container, and normalizing by the number of values in theobservation window. Thus, the pdf is a 20-bin histogram normalized torepresent discrete probabilities. Note that i in the above expressionindicates the container number. A different number of containers can bechosen depending on the length of the sliding observation window used.

Average Mutual Information

This feature is explored with the idea of finding a relation between theinformation in the focal channel and the homologous contralateralchannel. This feature is also considered as a nonlinearcross-correlation function. The mathematical expression used for thecomputation of the average mutual information is:${I_{AB} = {\sum\limits_{a_{i},b_{j}}{{P_{AB}( {a_{i},b_{j}} )}{\log_{2}\lbrack \frac{P_{AB}( {a_{i},b_{j}} )}{{P_{A}( a_{i} )}{P_{B}( b_{j} )}} \rbrack}}}},$

where

P_(AB) is the joint probability distribution of A and B.

P_(A) is the probability distribution of A, and

P_(B) is the probability distribution of B.

Window Length Selection

Several factors are taken into account when determining the windowlength to be used in the analysis. Among them are data stationarity,data length required to compute the features, sampling frequency,maximizing the distinguishability between preictal and ictal segments,and maximizing the accuracy in the prediction time. A compromise has tobe achieved between the requirement of a window sufficiently long tocompute specific features and a window short enough to assume datastationarity. An IEEG segment of tens of seconds can be consideredquasi-stationary, depending on the patient's behavioral state. Thisdepends also on the type of input signal under consideration, forexample chemical concentrations may be considered quasi-stationary overa longer time frames.

An original methodology for selecting the window size is introducedhere. This methodology arises as an answer to the issues of how toeffectively select the window size to compute specific features and howto create the feature vector when the features extracted have differentlengths. These questions emerged during the development of the featureextraction stage of this invention. The goal of this technique is tomaximize the distinguishability between the preictal/ictal class andbaseline class. The processing logic of FIG. 18 and results of FIG. 19summarize the procedure. In this scheme, each of the featurespre-selected is computed for different sliding window sizes. Thek-factor is used as the performance criteria that guides the window sizeselection by quantifying class-separability and variance, however anyother performance measure suitable for this purpose can be used.

Ninety different window sizes or less are selected within the range of50 points (0.25 seconds) to 9000 points (45 seconds). This window rangeis selected to include the maximum window size to satisfyquasi-stationarity of the data segments and the minimum window sizerequired to compute the feature. All these windows are shifted accordingto either of the following two criteria. The windows are shifted by afixed shift of 90 points (0.45 seconds) along the input sequence, or bythe shift that corresponds to preserving a 50% overlap in the runningwindow methodology. The running window method described earlier is usedto generate the features. These 90-point shifts or 50% of window lengthshifts fix the minimum prediction time to 0.45 seconds or to the timeshift that corresponds to the 50% of the window size used. The maximumdelay in the UEO detection is also the same as the time shift, assumingoptimal features, as those capable of detecting the seizure onset assoon as one sample of the ictal input data is within the sliding window.There is also a trade-off between this window shifting or timeresolution and the storage capacity of the system. The shorter this timeresolution or the smaller the window shifting, the greater the memoryspace required.

After each feature is computed for the different windows, the k-factorin the following equation is computed as a measure of effectiveness ofeach feature.${K = \frac{{\mu_{1} - \mu_{2}}}{\sqrt{( {\sigma_{1}^{2} + \sigma_{2}^{2}} )/2}}},$

where:

K is the k-factor (measure of effectiveness of the feature),

μ_(i) is the mean of feature for class i,

σ_(i) ² is the variance of feature for class i.

Around 20% of the available preseizure records are used to determine thebest window length to use. For each pre-seizure record used, the windowsize corresponding to the maximum k-factor is chosen to precede theanalysis. Then, a verification follows to confirm that the windowlengths that maximize the k-factor in each record are clustered aroundsome value. The center of the cluster of “optimal” window lengths ischosen as the window length for the feature under consideration. FIG. 19illustrates the variation of the k-factor for the fractal dimensionfeature, as the window size is changed for four different seizurerecords. The so-called “optimal” window length is within approximately1000 and 1500 points in this case.

Typically, the window sizes that maximize the k-factor are different foreach feature. Therefore, a strategy is required to allow the creation offeature vectors from features extracted with different sliding windowsizes and sometimes also with different window shiftings, which impliesthat the features do not coincide in time and have different time spansbetween consecutive values. One way to obtain a perfect time alignmentand identical time span across features, is by satisfying the followingtwo conditions. The first condition guarantees the same time span forconsecutive values on all the features. This is achieved by making theobservation window displacement equal for all the window sizes on allthe features. The second condition requires the alignment of all theobservation windows with respect to the right border of the longestwindow, as shown in FIG. 28. The effect of applying equal displacementof the observation window even for features with different window sizesis that the number of overlapping points on each observation window willchange from feature to feature, while the shifting points will remainconstant. Therefore, as a way to preserve the percentage of overlap forall the features or to even have different percentages of overlap anddifferent shiftings (making the system more general), a secondalternative can be followed. It is to align the features in time byresampling them. In this form, the features with less samples can beupsampled by adding as many values as needed. For example, if theupsampling is by three, then each value of the feature sequence will berepeated twice.

Using any of the two approaches described, historical and instantaneousfeatures can be combined by extracting historical features from theinstantaneous features utilizing a shift of one-feature-sample for theobservation window, upsampling if necessary to achieve a correct timealignment of the historical features and the instantaneous ones.Intuitively, this type of approach can outperform those that rely onlyon instantaneous features. An example is the use of delta features inspeech processing.

When the feature-parameter approach is used, the feature selection is arequired procedure performed by the supervisory control 400 thatinvolves the extraction of features within the feature library and theanalysis to select the “optimal” set of features.

Feature selection deals with determining the smallest subset of featuresthat satisfies a performance criterion once the set of candidatefeatures has been extracted. Candidate features must be ranked by theireffectiveness to achieve class separability. This implies that featureselection is also a feature optimization problem, where an optimalfeature subset has to be chosen from the combinatorial problem offinding a subset with the best M features out of N original features.Several issues must be considered for the feature selection, such asminimization of numerical ill-conditioning, maximization ofdiscrimination among classes, maximization of orthogonality, selectionof classifier topology, and computational loading for real-timeimplementation.

Typical causes of ill-conditioning are large differences in the ordersof magnitude between pairs of features, statistical correlation betweenany pair of features, a large number of features, and a small number oftraining feature vectors. To reduce ill-conditioning problems, featuresmust be normalized so that different scaled feature values will have thesimilar mean and variance. A basic normalization scheme can be achievedby using the expression:${{{\overset{\bigvee}{f}}_{k}(n)} = \frac{{f_{k}(n)} - \mu_{k}}{\sigma_{k}}},$

where:

f_(k) (n) is the nth sample from feature k,

{haeck over (f)}_(k)(n) is the nth sample normalized from feature k,

μ_(k) is the average over all feature samples from all classes,

σ_(k) is the standard deviation over all feature samples from allclasses.

Thus, μ_(k) and σ_(k) are computed as:$\mu_{k} = {{\frac{1}{N}{\sum\limits_{i = 1}^{N}\quad {{f_{k}(i)}\quad {and}\quad \sigma_{k}}}} = {\sqrt{\frac{1}{N - 1}{\sum\limits_{i = 1}^{N}\quad ( {{f_{j}(i)} - \mu_{k}} )^{2}}}.}}$

The implementation of the previous normalization scheme in an on-linefashion requires the computation of the average and standard deviationover a long term running window that covers part of the feature history.The length of the window for computing the parameters required forfeature normalization depends on the probability time horizon underconsideration. A typical window may be ten times or more the timehorizon analyzed. There is a trade-off between this historical windowand the memory available within the implantable device.

In addition, some correlation studies can be helpful to select a finalgroup of features that synergistically contributes to the onsetdetection task. These can be performed by the supervisory control at thecoordination level.

The feature vector optimization is performed initially in four majorsteps following a scheme of multi-dimensional feature optimization. Thisprocedure can evolve into a single-dimensional feature optimization, ifthe correlation and complementary nature of the features involved isqualitatively acceptable implying that the final feature set obtained byboth procedures (single and multi-dimensional) is about the same. Thefundamental aspects of the multidimensional scheme that can also be usedare summarized in the following steps:

Step 1: An initial basic pre-selection is used to discard features withevidently inferior class separability, by assessing the mean andstandard deviation differences in data segments from preictal andno-preictal conditions.

Step 2: Individual feature performance is evaluated using one or morecriteria for every feature that is not discarded during the initialbasic pre-selection.

Step 3: Features are ranked according to their performance measure by anoverlap measure criteria and then a modified version of an add-onalgorithm combined with heuristics is used to select the final featureset.

Step 4: Two-dimensional feature spaces are constructed and evaluated tovalidate qualitatively the implicit assumption of complementarity andlow correlation among the final feature set.

Considering that the performance of single dimensional featureoptimization is slightly lower (typically between 3 and 8%) than itsmultidimensional counterpart, it provides an acceptable optimization.However, if the feature correlation is such that the features are notcomplementary, a multidimensional feature optimization approach ispreferred. A computational assessment of the feature space is utilizedto evaluate the complementarity among the features involved. Theprevious steps and considerations are followed by the internal programresiding in the high level supervisory control 400 at the coordinationlayer.

A measure of overlap between the two classes involved (pre-seizure andno pre-seizure class) can be achieved on the estimated conditionalprobability distribution function (PDF) of the feature under analysisfor each class. FIGS. 29A and 29B present two examples of curvesproportional to the feature PDFs estimated directly from the data setfor each class in two patients of the database. The curve with the peakin the left is proportional to the estimated PDF of the weighted fractaldimension (WFD) obtained from the actual data values of the WFD in nopre-seizure segments that include baseline records. This can beexpressed mathematically as p(x|NPS), which means the PDF of feature x(in this case the WFD) given that the feature data belongs to the nopre-seizure class (NPS). The curve whose peak is in the right side ofthe figure, is proportional to the estimated PDF of the WFD given datafrom the pre-seizure class (p(x|PS)). The pre-seizure (PS) class isdefined as the segments whose length is identical to the time horizonunder analysis and whose ending point is right before the seizure UEO.The two graphs correspond to two different patients studied. During theanalysis of the data, it was observed that the PDF depicted by the curvewhose peak is in the right side of FIG. 29B, if plotted including thewhole seizure time (about 3 min.) as if it were from the preictal class,then the PDF becomes multimodal. In fact, this can be inferred bylooking at the trend of the left curve for low values of the WFD in FIG.29B. This was not always the case in every patient, but it was aninteresting observed behavior.

The overlap between the two classes is assessed by integrating theshaded region in FIGS. 29A and 29B, as stated according to:

ov=∫min(p(x|PS),p(x|NPS))dx,

where:

ov is a measure of overlap between the feature classes,

p(x|NPS) is the PDF of feature x given no seizure onset class,

x is a variable representing the feature for both classes,

p(x|PS) is the PDF of feature x given the seizure onset class.

Note that the better the class distinguishability for a particularfeature, the lower this overlap measure. The overlap measure is verygeneral in the sense that it works under multi-modal distributions.Using the previous equation the features can be ranked individually,preparing the ground to start the multiple-dimension featureoptimization.

In those problems where the class boundary is very complex and asubstantial overlap is obtained in the one-dimensional feature space, amultidimensional feature optimization is the path to follow. This typeof approach is computationally more intensive than single-dimensionfeature optimization, but it has the advantage of compensating for thecorrelation among features.

FIGS. 30 and 31 show the qualitative results from the construction ofthe 2-D feature space for some of the final pairs of features in thefinal feature set of one of the patients studied. This reinforces theidea that features are complementary. The top graphs in FIGS. 30 and 31correspond to the 1-D feature spaces of each of the three featuresselected, plotted in a 2-D graph for visualization purposes. Therepresentation of each 1-D plot as a 2-D plot is achieved by assigning arandom value to correspond with each feature value. In both figures itis observed how combined features enhance the performance by decreasingthe overlap between the classes.

Following the single dimensional feature optimization approach for allthe patients studied, the final feature set coincided for almost all thepatients when using the overlap measure and when using other performancecriteria such as the Fisher discriminant ratio (FDR). The overlapcriteria provides a more reliable distinguishability measure between theclasses since the FDR is a linear measure based on the 1st and 2ndstatistical moments while the overlap measure is based on the PDFs thatimplicitly contain the information of all the statistical moments.Therefore, even when the FDR measure suggested a slightly differentfinal feature set (where at most, one of the features was different),the overlap measure is chosen as the criterion to determine the finalfeature selection.

Patients with Multiple Focus Regions

In patients where the seizures arise from more than one focal region,multiple electrodes are implanted in each region. The approach followedin these cases is the same as that described above, with two possiblevariations regarding the fusion of information. In one variation, theinput signals from adjacent electrodes are subtracted forming a bipolarsignal, and then bipolar signals from different focus regions arecombined at the data level; in the other variation, the input signalsare combined at the feature level. The second variation implies thatfeatures computed with the same algorithm and perfectly coincident oraligned in time are combined into a single feature by using a nonlinearprocedure. Similarly, the first variation implies the combination of theintracranial EEG data or any other sensor data, before or after thepreprocessing stage, into a single data stream. A method for thenonlinear combination of the input signals either at the data or at thefeature level is to take the maximum of the two or more signals at everysample time. Besides this nonlinear combination, there are many othertechniques that can be used to combine or fuse these signals orchannels.

The combination of signals at the data and/or feature level can also beperformed in patients with a unique focal region, where thecomplementarity among the signals or features from electrodes placed indifferent regions enhances the prediction results.

Analysis/Classification

A classifier can be viewed as a mapping operator that projects the Mselected features contained in the feature vector onto a d-dimensionaldecision space, where d is the number of classes in the classificationproblem. In the classification problem under investigation for thisinvention, d=2 and M is chosen typically to be within the range of oneto six. It is definitely true that the feature extraction and selectionplays a crucial role in the classification results; however, it ishighly important to select a classifier architecture suitable to theunderlying feature distribution to obtain better performancerecognition.

As a benchmark and proof-of-concept, a radial basis neural network(RBNN), without the usual iterative training algorithms, has been used.Particularly, a Probabilistic Neural Network (PNN) has been used withinthis invention for its suitability for classification problems and itsstraightforward design. The PNN is a nonparametric classifier, and assuch it does not make assumptions regarding the statistical distributionof the data. This neural network is also called kernel discriminantanalysis, or the method of Parzen windows.

FIG. 32 illustrates the PNN architecture which corresponds to one of theembodiments of this invention. In other embodiments, different neuralnetworks can be used or a combination of a neural network with a fuzzysystem can be utilized. The weights used at the hidden layer of the PNNare directly the training vectors used. As can be seen in FIG. 32, thistype of network requires one node for each training vector W_(k), whichrepresents a major disadvantage since the amount of computation involvedto reach a classification, slows down its operation. Increasing thememory capacity such that the PNN can be wired (run in parallel) candecrease the computational burden and accelerate the classification. Onthe other hand, an advantage of the PNN is its convergence to an optimalBayesian classifier provided it is given enough training vectors, andunder equiprobable spherical class covariances for the particularimplementation used in this invention.

The architecture illustrated in FIG. 32 corresponds to the particularcase of a two-class problem, with three-dimensional feature vectors,

x=[x ₁ x ₂ x ₃ ]^(T).

Every weight W_(kj) in the hidden layer is the jth component of the kthfeature vector in the training set, where the kth feature vector isgiven by

W _(k) =[w _(1,k) w _(2,k) w _(3,k)]^(T)

where k=1, 2, . . . , n and n is the number of feature vectors(patterns) in the training set. The output layer estimates theprobability of having a seizure, given the input feature vector. Thistranslates into the probability that the input signals belong to thepre-seizure/seizure class (preictal class) or to the non-pre-seizureclass (baseline class), given the input feature vector, and ismathematically represented by:

P ₁ =P(PS|x) and P ₂ =P(NPS|x)

where PS is the “pre-seizure/seizure class” and NPS is the“non-pre-seizure class”. Matrix T contains the weights on the outputlayer, which indicate the corresponding class of each training featurevector, in the 1-of-k binary feature format, as typical in supervisedlearning approaches like this.

This architecture can be perceived in two ways. In one interpretationthe Euclidean distance z_(k) between each input feature vector x andeach of the training vectors w_(k) is computed at each node ∥x'w_(k)∥ inthe hidden layer and passed through a Gaussian window e^(−Z) ^(_(k)) ²^(/σ) ² , where σ² is a width parameter of the window. The secondinterpretation is more from a neural network point of view, andconsiders that each input feature vector x is evaluated at n Gaussianwindows with each one centered at a different training feature vectorw_(k), k=1, . . . , n, and with variance σ².

The present invention is realized in a combination of hardware andsoftware. Any kind of computer system or other apparatus adapted forcarrying out the methods described herein is suited. A typicalcombination of hardware and software could be a general purpose computersystem with a computer program that, when loaded and executed, controlsthe computer system such that it carries out the methods describedherein. The present invention can also be embedded in a computer programproduct which includes all the feature enabling the implementation ofthe methods described herein, and which, when loaded in a computersystem is able to carry out these methods.

Computer program instructions or computer program in the present contextmeans any expression in any language, code, or notation or a set ofinstructions intended to cause a system having an information processingcapability to perform a particular function, either directly or wheneither or both of the following occur: (a) conversion to anotherlanguage, code, or notation; (2) reproduction in a different materialform.

In light of the above teachings, those skilled in the art will recognizethat the disclosed methods, formulas, algorithms, and embodiments may bereplaced, modified, or adapted without departing from the spirit oressential attributes of the invention. Therefore, it should beunderstood that within the scope of the appended claims, this inventionmay be practiced otherwise than as exemplified herein.

What is claimed is:
 1. A method for predicting and controlling theelectrographic and clinical onset of a seizure and other neurologicalevents in an individual, comprising the acts of: generating data that isacquired from a plurality of input signals obtained from at least onesensor located in or on the individual; fusing the data to combineinformation from the at least one sensor that is connected to at leastone transducer; selecting and extracting a plurality of features fromthe fused data; determining from the extracted features if a seizure orother neurological event is likely to occur within a plurality ofspecified time frames, and the probability of having a seizure for eachspecified time frame; providing an alarm to the individual to inform himof an imminent seizure or neurological event when the probability ofseizure is higher than an adaptive threshold; and applying a controlrule to initiate an intervention measure that is commensurate with theprobability of the electrographical onset of a seizure for eachspecified time frame.
 2. The method for predicting and controlling theelectrographic onset of a seizure of claim 1 further comprising the actof normalizing the selected features before determining if a seizure islikely to occur within the specified time frame.
 3. The method forpredicting and controlling the electrographic onset of a seizure ofclaim 1 further comprising preprocessing of the input signals to reducenoise, to enhance the quality, to compensate for undesireable signalvariations and to emphasize distinguishability between a pre-seizureclass and a non-pre-seizure class.
 4. The method for predicting andcontrolling the electrographic onset of a seizure of claim 3 wherein theact of preprocessing of the input signals comprises subtraction of inputsignals from spatially adjacent sensors that measure the same type ofactivity.
 5. The method for predicting and controlling theelectrographic onset of a seizure of claim 3 wherein the act ofpreprocessing the input signals comprises classification of anindividual's awareness state within at least one of the categories ofawake, asleep, and drowsy using algorithms based on frequency and timeinformation.
 6. The method for predicting and controlling theelectrographic onset of a seizure of claim 1 wherein the interventionmeasure is an electrical stimulus of a minimally required duration andintensity that is delivered at a time that is based on the probabilityof seizure for a specified time frame.
 7. The method for predicting andcontrolling the electrographic onset of a seizure of claim 1 wherein theintervention measure is a drug infusion that is activated to deliver aminimally required amount of a drug into the individual at a time thatis based on the probability of seizure for a specified time frame. 8.The method for predicting and controlling the electrographic onset of aseizure of claim 1 wherein the intervention measure is a magneticstimulus generated by the wearing of a magnetic helmet at a time that isbased on the probability of seizure for a specified time frame.
 9. Themethod for predicting and controlling the electrographic onset of aseizure of claim 1 wherein the intervention measure is a procedure thatincludes the solving of highly cognitive problems.
 10. The method forpredicting and controlling the electrographic onset of a seizure ofclaim 1 wherein the intervention measure is a sensory stimulationincluding at least one of music therapy, images, flavors, odors andtactile sensations.
 11. The method for predicting and controlling theelectrographic onset of a seizure of claim 1 wherein the interventionmeasure is delivered in at least one of a region of onset and adistribution region surrounding the region of offset.
 12. The method forpredicting and controlling the electrographic onset of a seizure ofclaim 1 wherein the intervention measure is delivered in subcorticalregions including at least one of the thalamus, basal ganglia, and otherdeep nuclei.
 13. The method for predicting and controlling theelectrographic onset of a seizure of claim 1 wherein if theelectrograhic onset occurs, applying treatment to either at least one ofa general region of onset and deep brain structures to modulate thebehavior of the seizure focus.
 14. The method for predicting andcontrolling the electrographic onset of a seizure of claim 1 wherein theintervention measure application includes at least one of: rhythmicelectrical pacing that changes in frequency, intensity and distributionas the probability of a seizure onset reaches and exceeds a threshold;chaos control pacing; random electrical stimulation to interfere withdeveloping coherence in activity in a region of, and surrounding, anepileptic focus; depolarization or hyperpolarization stimuli to silenceor suppress activity in actively discharging regions, or regions at riskfor seizure spread.
 15. The method for predicting and controlling theelectrographic onset of a seizure of claim 14 wherein the interventionmeasure is delivered to a plurality of electrodes to provide a surroundinhibition to prevent a progression of a seizure precursor.
 16. Themethod for predicting and controlling the electrographic onset of aseizure of claim 14 wherein the intervention measure is deliveredsequentially in a wave that covers a cortical or subcortical region oftissue so as to progressively inhibit normnal or pathological neuronalfunction in the covered region.
 17. The method for predicting andcontrolling the electrographic onset of a seizure of claim 1 wherein theintervention measure application is an infusion of a therapeuticchemical agent into a brain region where seizures are generated, or towhich they may spread.
 18. The method for predicting and controlling theelectrographic onset of a seizure of claim 17 wherein the chemical agentis delivered in greater quantity, concentration or spatial distributionas the probability of seizure increases.
 19. The method for predictingand controlling the electrographic onset of a seizure of claim 17wherein the intervention measure is applied to at least one of anepilectic focus, an area surrounding the epilectic focus, a regioninvolved in an early spread, and a central or deep brain region tomodulate seizure propagation.
 20. The method for predicting andcontrolling the electrographic onset of a seizure of claim 17 whereinthe therapeutic chemical agent is activated by oxidative stress andincreases in concentration and distribution as the probability ofseizure increases.
 21. The method for predicting and controlling theelectrographic onset of a seizure of claim 1 wherein the interventionmeasure is delivered to central nerves or blood vessels in a graduatedmanner as the probability of seizure increases.
 22. The method forpredicting and controlling the electrographic onset of a seizure ofclaim 1 wherein the intervention measure is a plurality of artificialneuronal signals delivered to disrupt eletrochemical traffic on at leastone neuronal network that includes or communicates with an ictal onsetzone.
 23. The method for predicting and controlling the electrographiconset of a seizure of claim 1 wherein the alarm is any one of a visualsignal, an audio signal and a tactile sensation.
 24. The method forpredicting and controlling the electrographic onset of a seizure ofclaim 1 wherein the plurality of features are selected for eachindividual.
 25. The method for predicting and controlling theelectrographic onset of a seizure of claim 1 wherein the same pluralityof features are selected for each individual.
 26. The method forpredicting and controlling the electrographic onset of a seizure ofclaim 1 wherein parameters of the selected features are tuned for eachindividual.
 27. The method for predicting and controlling theelectrographic onset of a seizure of claim 26 wherein one of theparameters that is used for each selected feature is a running windowlength that is used in feature extraction.
 28. The method for predictingand controlling the electrographic onset of a seizure of claim 27wherein a determination of the running window length and a starting timefor feature extraction over an input signal for every feature includesthe acts of: determining a window range based on stationarity criteriaand a minimum length to compute a feature under analysis; determining afeature value for each of a plurality of different window sizes;calculating a feature effectiveness measure based on classdistinguishability for the plurality of different window sizes used forevery feature; determining the window length that corresponds to a bestclass distinguishability as indicated by a maximum value or minimumvalue of the feature effectiveness measure; and aligning the pluralityof windows with the window having the maximum length such that the rightedge of all windows coincide.
 29. The method for predicting andcontrolling the electrographic onset of a seizure of claim 28 whereinthe maximum or minimum values of the feature effectiveness measure thatprovides the best class distinguishability depends on the featureeffectiveness measure in use.
 30. The method for predicting andcontrolling the electrographic onset of a seizure of claim 28 whereinthe feature effectiveness measure determines the window length thatmaximizes the distinguishability between a preictal/ictal class and abaseline class.
 31. The method for predicting and controlling theelectrographic onset of a seizure of claim 30 wherein the act ofselecting and extracting a plurality of features comprises the acts of:extracting a set of candidate features from the feature library; rankingthe extracted features by the feature effectiveness measure; anddetermining a smallest subset of features that satisfies a performancecriterion.
 32. The method for predicting and controlling theelectrographic onset of a seizure of claim 31 further comprising theacts of: performing an initial pre-selection from the feature library todiscard a plurality of features with inferior class separability; andevaluating individual feature performance using at least one criterionfor every feature that is not discarded during the initialpre-selection.
 33. The method for predicting and controlling theelectrographic onset of a seizure of claim 31 wherein the act or rankingthe extracted features by the feature effectiveness measure uses anoverlap measure criterion, a modified add-on algorithm and heuristics toselect a final feature set.
 34. The method for predicting andcontrolling the electrographic onset of a seizure of claim 33 whereinthe overlap measure criterion is based on functions proportional to theestimated conditional probability distributions of the features underanalysis for both a pre-seizure class and a non-pre-seizure class. 35.The method for predicting and controlling the electrographic onset of aseizure of claim 31 further comprising the acts of constructing andevaluating two-dimensional feature spaces to validate qualitatively thatthe final feature set is complementary and has low correlation among thefinal features.
 36. The method for predicting and controlling theelectrographic onset of a seizure of claim 1 wherein a plurality offeatures are extracted at an analog level.
 37. The method for predictingand controlling the electrographic onset of a seizure of claim 1 whereina plurality of features are extracted at a digital level.
 38. The methodfor predicting and controlling the electrographic onset of a seizure ofclaim 1 wherein the plurality of features are extracted over apre-established window length.
 39. The method for predicting andcontrolling the electrographic onset of a seizure of claim 38 furthercomprising shifting of the window over the plurality of input signals toallow at least a partial overlap with a previous window, reusing theextracted features in the overlap portion and repeating the extractionof the plurality of features on a new input portion within the window.40. The method for predicting and controlling the electrographic onsetof a seizure of claim 1 wherein the act of fusing the data comprises theact of combining the plurality of signals from at least one sensor usingan intelligent tool including a neural network or a fuzzy logicalgorithmn.
 41. The method for predicting and controlling theelectrographic onset of a seizure of claim 40 wherein the neural networkor fuzzy logic algorithm include at least one of a probabilistic neuralnetwork, a k-nearest neighbor neural network, a wavelet network, and acombination probabilistic/k-nearest neighbor neural network.
 42. Themethod for predicting and controlling the electrographic onset of aseizure of claim 1 wherein the plurality of features is selected from afeature library including a plurality of historical and instantaneousfeatures.
 43. The method for predicting and controlling theelectrographic onset of a seizure of claim 42 wherein the plurality ofinstantaneous features are generated directly from preprocessed andfused input signals through a running observation window.
 44. The methodfor predicting and controlling the electrographic onset of a seizure ofclaim 42 wherein the historical features are based on a historicalevolution of features over time.
 45. The method for predicting andcontrolling the electrographic onset of a seizure of claim 44 wherein atleast one historical feature is generated as a feature of other featuresby a second or higher level of feature extraction.
 46. The method forpredicting and controlling the electrographic onset of a seizure ofclaim 42 wherein the historical and instantaneous features are limitedto a focus region in the brain of an individual.
 47. The method forpredicting and controlling the electrographic onset of a seizure ofclaim 42 wherein the historical and instantaneous features are derivedas a spatial feature from a combination of a plurality of regions in thebrain of an individual.
 48. The method for predicting and controllingthe electrographic onset of a seizure of claim 42 wherein the featurelibrary includes a collection of custom routines to compute thefeatures.
 49. The method for predicting and controlling theelectrographic onset of a seizure of claim 42 wherein the plurality offeatures are extracted from different domains.
 50. The method forpredicting and controlling the electrographic onset of a seizure ofclaim 49 wherein at least one feature is a ratio of a short term valueand a long term value of that feature.
 51. The method for predicting andcontrolling the electrographic onset of a seizure of claim 49 whereinthe different domains include at least two of time, frequency, wavelet,fractal geometry, stochastic processes, statistics, and informationtheory domains.
 52. The method for predicting and controlling theelectrographic onset of a seizure of claim 51 wherein the time domainfeatures include at least one of an average power, a power derivative, afourth-power indicator, an accumulated energy, an average non-linearenergy, a thresholded non-linear energy, a duration of thresholdednon-linear energy, and a ratio of short term and long term powerfeature.
 53. The method for predicting and controlling theelectrographic onset of a seizure of claim 52 wherein the fractalgeometry features include at least one of a fractal dimension of analogsignal, a curve length, a fractal dimension of digital signals, a ratioof short term and long term curve length, an a ratio of short term andlong term fractal dimensions of digital signals.
 54. The method forpredicting and controlling the electrographic onset of a seizure ofclaim 52 wherein the frequency domain features include at least one of apower spectrum, a power on frequency bands, a coherence betweenintracranial channels, a mean crossings and a zero crossings feature.55. The method for predicting and controlling the electrographic onsetof a seizure of claim 52 wherein the wavelet domain features include atleast one of a spike detector, a density of spikes over time, and anabsolute value of a wavelet coefficient.
 56. The method for predictingand controlling the electrographic onset of a seizure of claim 52wherein the statistics and stochastic process domains include at leastone of a mean frequency index, a cross-correlation between differentintracranial channels, and autoregressive coefficients.
 57. The methodfor predicting and controlling the electrographic onset of a seizure ofclaim 52 wherein the information theory features include at least one ofan entropy feature and an average mutual information feature.
 58. Themethod for predicting and controlling the electrographic onset of aseizure of claim 1 further comprising the act of fusing the selectedfeatures to include establishing an individual-tuned variablenormalization level that uses an individual's state of awareness tonormalize an accumulated energy or other feature and decide if a seizureis approaching when a normalized threshold value is exceeded.
 59. Acomputer readable medium containing a computer program product forpredicting and controlling the electrographic and clinical onset of aseizure and other neurological events in an individual, the computerprogram product comprising: program instructions that generate dataacquired from a plurality of input signals obtained from at least onesensor located in or on the individual; program instructions that fusethe data to combine information from the at least one sensor that isconnected to at least one transducer; program instructions that selectand extract a plurality of features from the fused data; programinstructions that determine from the extracted features if a seizure orother neurological event is likely to occur within a plurality ofspecified time frames, and the probability of having a seizure for eachspecified time frame; program instructions that generate an alarm to theindividual to inform him of an imminent seizure or neurological eventwhen the probability of seizure is higher than an adaptive threshold;and program instructions that apply a control rule to initiate anintervention measure that is commensurate with the probability of theelectrographical onset of a seizure.
 60. The computer program productfor predicting and controlling the electrographic onset of a seizure ofclaim 59 further comprising program instructions that initiate apreproccessing of the input signals to reduce noise and to enhance thequality, and to emphasize distinguisability between a pre-seizure classand a non-pre-seizure class.
 61. The computer program product forpredicting and controlling the electrographic onset of a seizure ofclaim 60 wherein the program instruction for preprocessing of the inputsignals further comprises program instructions that subtract the signalsfrom spatially adjacent sensors that measure the same type of activity.62. The computer program product for predicting and controlling theelectrographic onset of a seizure of claim 60 wherein the programinstructions for preprocessing of the input signals further comprisesprogram instructions that classify an individual's awareness statewithin at least one of the categories of awake, asleep, and drowsy. 63.The computer program product for predicting and controlling theelectrographic onset of a seizure of claim 62 wherein the programinstructions that classify an individual's awareness state within thecategories of awake, asleep and drowsy are based on frequency and timeinformation.
 64. The computer program product for predicting andcontrolling the electrographic onset of a seizure of claim 59 furthercomprising program instructions that initiate an electrical stimulus ofa minimally required duration and intensity that is delivered at a timethat is based on the probability of seizure for a specified time frame.65. The computer program product for predicting and controlling theelectrographic onset of a seizure of claim 59 further comprising programinstructions that initiate activation of a drug infusion to deliver aminimally required amount of a drug into the individual at a time thatis based on the probability of a seizure for a specified time frame. 66.The computer program product for predicting and controlling theelectrographic onset of a seizure of claim 59 further comprising programinstructions that initiate generation of a magnetic stimulus through thewearing of a magnetic helmet at a time that is based on the probabilityof seizure for a specified time frame.
 67. The computer program productfor predicting and controlling the electrographic onset of a seizure ofclaim 59 further comprising program instructions that provide anindication that a cognitive problem should be solved as an interventionmeasure.
 68. The computer program product for predicting and controllingthe electrographic onset of a seizure of claim 59 further comprisingprogram instructions that provide an indication that a sensorystimulation should be applied as an intervention measure.
 69. Thecomputer program product for predicting and controlling theelectrographic onset of a seizure of claim 59 further comprising programinstructions that initiate activation of any one of a visual alarm, anaudio alarm, and a tactile sensation.
 70. The computer program productfor predicting and controlling the electrographic onset of a seizure ofclaim 59 further comprising program instructions that select a pluralityof features for each individual.
 71. The computer program product forpredicting and controlling the electrographic onset of a seizure ofclaim 59 further comprising program instructions that select the sameplurality of features for each individual.
 72. The computer programproduct for predicting and controlling the electrographic onset of aseizure of claim 59 further comprising program instructions that tunethe parameters of the selected features for each individual.
 73. Thecomputer program product for predicting and controlling theelectrographic onset of a seizure of claim 59 further comprising programinstructions that determine a running window length which is used infeature extraction for each selected feature.
 74. The computer programproduct for predicting and controlling the electrographic onset of aseizure of claim 73 further comprising program instructions that extracta plurality of features over a pre-established window length.
 75. Thecomputer program product or predicting and controlling theelectrographic onset of a seizure of claim 74 further comprising programinstructions that shift the window over the plurality of input signalsto allow at least a partial overlap with a previous window and repeatthe extraction of the plurality of features.
 76. The computer programproduct for predicting and controlling the electrographic onset of aseizure of claim 73 wherein the program instructions for determining therunning window length further comprise: program instructions thatdetermine a window range based on stationarity criteria and a minimumlength to compute a feature under analysis; program instructions thatdetermine a feature value for each of a plurality of different windowsizes; program instructions that calculate a feature effectivenessmeasure for each feature for the plurality of different window sizes;program instructions that determine the optimal window length for eachfeature from the plurality of windows examined that corresponds to avalue of the feature effectiveness measure wherein the distinguisabilitybetween a preictal class and a non-preictal class is maximized; andprogram instructions that align the plurality of optimal windowsdetermined for each feature with the feature window having the maximumlength.
 77. The computer program product for predicting and controllingthe electrographic onset of a seizure of claim 76 further comprisingprogram instructions that initiate re-execution of the programinstructions that determine a feature value and the program instructionsthat calculate a feature effectiveness measure for each selectedfeature.
 78. The computer program product for predicting and controllingthe electrographic onset of a seizure of claim 76 further comprisingprogram instructions that maximize the distinguishability between apreictal/ictal class and a baseline class as the feature effectivenessmeasure.
 79. The computer program product for predicting and controllingthe electrographic onset of a seizure of claim 78 wherein the programinstructions that select and extract a plurality of features comprise:program instructions that extract a set of candidate features from thefeature library; program instructions that rank the extracted featuresby the feature effectiveness measure; and program instructions thatdetermine a smallest subset of features that satisfies a performancecriterion.
 80. The computer program product for predicting andcontrolling the electrographic onset of a seizure of claim 79 furthercomprising: program instructions that perform an initial pre-selectionfrom the feature library to discard a plurality of features withinferior class separability; and program instructions that evaluateindividual feature performance using at least one criterion for everyfeature that is not discarded during the initial pre-selection.
 81. Thecomputer program product for predicting and controlling theelectrographic onset of a seizure of claim 79 wherein the programinstructions that rank the extracted features by the featureeffectiveness measure use an overlap measure criterion, a modifiedadd-on algorithm and heuristics to select a final feature set.
 82. Thecomputer program product for predicting and controlling theelectrographic onset of a seizure of claim 81 further comprising programinstructions that construct and evaluate two-dimensional feature spacesto validate qualitatively that the final feature set is complementaryand has low correlation among the final features.
 83. The computerprogram product for predicting and controlling the electrographic onsetof a seizure of claim 81 further comprising program instructions thatbase the overlap measure criterion on estimated conditional probabilitydistributions of each particular feature under analysis for both apre-seizure class and non-pre-seizure class.
 84. The computer programproduct for predicting and controlling the electrographic onset of aseizure of claim 59 further comprising program instructions that extracta plurality of features at an analog level.
 85. The computer programproduct for predicting and controlling the electrographic onset of aseizure of claim 59 further comprising program instructions that extracta plurality of features at a digital level.
 86. The computer programproduct for predicting and controlling the electrographic onset of aseizure of claim 59 further comprising program instructions that combinethe plurality of signals from at least one sensor using an intelligenttool that includes a neural network or a fuzzy logic algorithm.
 87. Thecomputer program product for predicting and controlling theelectrographic onset of a seizure of claim 86 further comprising programinstructions that determine at least one of a probabilistic neuralnetwork, a k-nearest neighbor neural network, a wavelet network, and acombination probabilistic/k-nearest neighbor neural network.
 88. Thecomputer program product for predicting and controlling theelectrographic onset of a seizure of claim 59 further comprising programinstructions that select a plurality of features from a feature librarythat includes a plurality of historical and instantaneous features. 89.The computer program product for predicting and controlling theelectrographic onset of a seizure of claim 88 further comprising programinstructions that generate a plurality of instantaneous featuresdirectly from pre-processed and fused input signals through a runningobservation window.
 90. The computer program product for predicting andcontrolling the electrographic onset of a seizure of claim 88 furthercomprising program instructions that generate historical features basedon a historical evolution of features over time.
 91. The computerprogram product for predicting and controlling the electrographic onsetof a seizure of claim 88 further comprising program instructions thatlimit the historical and instantaneous features to a focus region in thebrain of an individual.
 92. The computer program product for predictingand controlling the electrographic onset of a seizure of claim 88further comprising program instructions that derive historical andinstantaneous features as a spatial feature from a combination of aplurality of regions in the brain of an individual.
 93. The computerprogram product for predicting and controlling the electrographic onsetof a seizure of claim 88 further comprising program instructionscollected as custom routines within the feature library to compute thefeatures.
 94. The computer program product for predicting andcontrolling the electrographic onset of a seizure of claim 88 furthercomprising program instructions that extract a plurality of featuresfrom different domains.
 95. The computer program product for predictingand controlling the electrographic onset of a seizure of claim 94further comprising program instructions that determine at least onefeature as a ratio of a short term value and a long term value of thatfeature.
 96. The computer program product for predicting and controllingthe electrographic onset of a seizure of claim 94 wherein the differentdomains include at least two of time, frequency, wavelet, fractalgeometry, stochastic processes, statistics, and information theorydomains.
 97. The computer program product for predicting and controllingthe electrographic onset of a seizure of claim 96 further comprisingprogram instructions that determine at least one of an average power, apower derivative, a fourth-power indicator, an accumulated energy, andaverage non-linear energy, a thresholded non-linear energy, a durationof thresholded non-linear energy, and a ratio of short term and longterm power as time domain features.
 98. The computer program product forpredicting and controlling the electrographic onset of a seizure ofclaim 97 further comprising program instructions that determine at leastone of a fractal dimension of analog signals, a curve length, a fractaldimension of digital signals, a ratio of a short term and a long termfractal dimension of digital signals, and a ratio of short term and longterm curve length as fractal geometry features.
 99. The computer programproduct for predicting and controlling the electrographic onset of aseizure of claim 97 further comprising program instructions thatdetermine at least one of a power spectrum, a power on frequency bands,a coherence between intracranial channels, a mean crossings and a zerocrossings feature.
 100. The computer program product for predicting andcontrolling the electrographic onset of a seizure of claim 97 furthercomprising program instructions that determine at least one of a spikedetector, a density of spikes over time, and an absolute value of awavelet coefficient as wavelet domain features.
 101. The computerprogram product for predicting and controlling the electrographic onsetof a seizure of claim 97 further comprising program instructions thatdetermine at least one of a mean frequency index, a cross-correlationbetween different intracranial channels, and autoregressive coefficientsas features in the statistics and stochastic process domains.
 102. Thecomputer program product for predicting and controlling theelectrographic onset of a seizure of claim 97 further comprising programinstructions that determine at least one of an entropy feature and anaverage mutual information feature as information theory features. 103.The computer program product for predicting and controlling theelectrographic onset of a seizure of claim 59 further comprising programinstructions that fuse the selected features to include establishing anindividual-tuned variable normalization level that uses an individual'sstate of awareness to normalize an accumulated energy or other featureand decide if a seizure is approaching when a normalized threshold valueis exceeded.